12wA求原因
查看原帖
12wA求原因
1453256
yucplusplus楼主2024/10/14 02:57
#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
#define LL long long
int main()
{
	int bgx[10]={0};
	for(int i=1;i<=7;i++){
		int a,b;
		cin>>a>>b;
		if(a+b>=8)
			bgx[i]+=a+b;
	}
	int h=0;
	for(int i=1;i<=7;i++){
		if(bgx[h]<bgx[i]) h=i;
	}
	cout<<h;
	return 0;
}

大佬们,救救我12WA了

2024/10/14 02:57
加载中...