Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
54336 | zhangweiran | 不高兴的津津 | C++ | Accepted | 0 MS | 244 KB | 341 | 2024-10-27 10:41:07 |
#include<bits/stdc++.h> using namespace std; int main(){ int hours, worst_day = 0, worst_hours = 0, a, b; for(int i = 1; i <= 7; i++){ cin >> a >> b; hours = a + b; if(hours > worst_hours){ worst_day = i; worst_hours = hours; } } cout << worst_day; return 0; }