7 solutions

  • 0
    @ 2025-9-27 20:04:01

    #include<bits/stdc++.h> using namespace std; int main() { int a=0,b=0,c=0,n=0; cin>>a>>b; if(a==b) { cout<<24; } else if(a<b) { c=b-a; cout<<c; } else if(a>b) { c=24-a+b; cout<<c; }

    return 0;
    

    } Copy -1

    张艺北 LV 3 @ 1 个月前 想法猎物让他

    -4

    祝福 LV 6 @ 9 个月前 #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a>=b) { b=b+24; } cout<<b-a; return 0; } Copy -5

    钱宇宸 LV 6 @ 11 个月前 #include<bits/stdc++.h> using namespace std;

    Information

    ID
    24
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    191
    Accepted
    86
    Uploaded By