样例过了但爆零,求调
查看原帖
样例过了但爆零,求调
1016380
Cute_Catlady_yining楼主2025/2/3 20:58
#include <bits/stdc++.h>
using namespace std;
int n, t, a, b, c, d, e;
int main(){
    cin >> n >> t;
    while (cin >> a >> b >> c >> d){
        if (a + b + c + d >= t) e = a + b + c + d;
        else{
            e = a + b + c + d;
            break;
        }
    }
    cout << e;
    return 0;
}
2025/2/3 20:58
加载中...