90分求助
查看原帖
90分求助
1013897
lilexin楼主2023/9/28 16:31
#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,flag=1,temp,maxn=0;
  for (int i=1;i<=7;i++){
  	  cin>>a>>b; 
	  if(a+b>8&&(a+b)-maxn>0){ 
	  	flag=0;
	  	maxn=a+b; 
	  	temp=i;
	  	break; 
	  }	  
  } 
  if(flag==1){
  	cout<<"0"; 
  }
  else{
  	cout<<temp; 
  }
  return 0;
}
2023/9/28 16:31
加载中...