救命#6030哪不对

Kinghero King of the summit 2022-07-09 11:44:32 0
#include <iostream>
using namespace std;
int main() {
    int a, b;
    cin >> a >> b;
    if (a > 60) {
        if (b > 60) {
            cout << 1;
        } else {
            cout << 0;
        }
    } 
    else
    {
        cout << 0;
    }
    return 0;
}
{{ vote && vote.total.up }}

共 2 条回复

CPP 刷题王

恰好有一门不及格才输出1!

xhg

正确答案: #include <bits/stdc++.h> using namespace std; int main(){ long long int a,b; cin>>a>>b; if(a<60&&b>=60){ cout<<"1"; }else if(b<60&&a>=60){ cout<<"1"; }else{ cout<<"0"; } return 0; }