You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
628 B
16 lines
628 B
2 years ago
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
int a, b;
|
||
|
int day, mx; // 哪一天最不开心,最大值是多少,两个变量记录
|
||
|
int main() {
|
||
|
for (int i = 1; i <= 7; i++) { // 分别表示周一到周日的日程安排
|
||
|
cin >> a >> b; // 津津在学校上课的时间和妈妈安排她上课的时间
|
||
|
if (a + b > 8 && a + b > mx) { // 津津如果一天上课超过八个小时就会不高兴
|
||
|
mx = a + b; // 更新最大值
|
||
|
day = i; // 记录哪一天
|
||
|
}
|
||
|
}
|
||
|
cout << day << endl;
|
||
|
return 0;
|
||
|
}
|