```
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
if(d<b)cout<<c-a-1<<" "<<60-b+d;
else if(d>=b)cout<<c-a<<" "<<d-b;}
```
看一下我的。
by zfw100 @ 2022-12-20 12:28:35
@[zfw100](/user/797464) 这题不用分支可以拿满分
```
#include <bits/stdc++.h>
using namespace std;
int main()
{
int m,n,x,y;
cin >> m >> n >> x >> y;
int a = (x * 60 + y) - (m * 60 + n);
cout << a / 60 << " " << a % 60;
return 0;
}
```
by lznxes @ 2023-03-05 09:13:35