大佬们球球为什么第12个是错的
查看原帖
大佬们球球为什么第12个是错的
1229436
fanzujian18676735170楼主2023/12/3 23:28
#include<iostream>
using namespace std;
int main()
{
	int a[7], b[7];
	for (int i = 0; i < 7; i++)
	{
		cin >> a[i] >> b[i];
	}
	int max = 0,t=0;
	for (int i = 0; i < 7; i++)
	{
		if (a[i] + b[i] > max && a[i]+b[i] >= 8)
		{
			max = a[i] + b[i];
			t = i+1;
		}
	}
	cout << t;
	system("pause");
}

2023/12/3 23:28
加载中...