我都怀疑#12机是坏的
查看原帖
我都怀疑#12机是坏的
1303746
Internet_Explorer_14楼主2024/3/17 14:28

我都怀疑#12机是坏的
下载了数据后#12的输入数据是:
5 3
6 2
7 1
5 3
4 4
0 4
0 6
本地调试结果:
0
很正常吧
可是!
(图片)

#include<iostream>
int main(){
	int a,b,c,max=0;
	for(int t=1;t<8;t++){
		std::cin>>a>>b;
		if(a+b>8)if(a+b>max)max=a+b,c=t;
	}
	std::cout<<c;
	return 0;
}
2024/3/17 14:28
加载中...