救救我!

liuhuanyu 2024-11-23 13:56:55 2
#include <bits/stdc++.h>
using namespace std;
int main() {
    int a, b, t, tmax = 0, whattimeisit;
    for (int i = 1; i <= 7; i++) {
        cin >> a >> b;
        t = a + b;
        if (t > 8 && t > tmax) {
            tmax = t;
            whattimeisit = i;
        }
    }
    cout << whattimeisit;
    return 0;
}

@root 请帮我看一下,91分,谢谢!

{{ vote && vote.total.up }}

共 3 条回复

liuhuanyu

谢谢!

root 站长

whattimeisit 变量没有初始化为 0

liuhuanyu