题解
2023-10-31 15:47:15
发布于:江苏
91阅读
0回复
0点赞
注意看,这个眼镜女孩叫津津,就是noip比赛里天天来砸场子的。看,她又来了......
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
int main ()
{
int a,b,s,max=0,i,day=0;
for (i=1;i<8;i++)
{
cin>>a>>b; //a要上学要的,b课外班
s=a+b;
if ((s>max)&&(s>8)) max=s,day=i;
}
cout<<day;
return 0;
}
全部评论 3



昨天 来自 浙江
0#include<bits/stdc++.h> using namespace std; int main(){ int n,x,max=0,day=0,he; for (int i=0;i<8;i++){ cin>>n>>x; he=n+x; if ((he>max)&&(he>8)){ max=he,day=i; } } return 0; }错了
昨天 来自 浙江
0额...
昨天 来自 浙江
0








有帮助,赞一个