ヽ(*。>Д<)o゜ 我没招了,真不会啊

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main(){
    int sa,sb,ea,eb;
    cin>>sa>>sb>>ea>>eb;
    ea-=sa;
    if(eb-sb<0){
        ea--;
        eb+=60-sb;
    }
    while(eb>=60){
        ea++;
        eb-=60;
    }
    cout<<ea<<" "<<eb;
    return 0;
}

0 comments

No comments so far...

Information

ID
509
Time
1000ms
Memory
256MiB
Difficulty
10
Tags
# Submissions
8
Accepted
0
Uploaded By