4 solutions
-
0
Guest MOD
- 1
Information
- ID
- 1329
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- # Submissions
- 77
- Accepted
- 38
- Uploaded By
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,g,h; double i; cin>>a>>b>>c>>d; a=a60; c=c60; e=a+b; f=c+d; g=f-e; h=g/60; i=g%60; cout<<h<<" "<<i; return 0; }
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n[100],n2,n3;
signed main(){
for(int i=1;i<=4;i++){
cin>>n[i];
if(i%2!=0) n[i]*=60;
}
n2=n[1]+n[2],n3=n[3]+n[4];
n2=n3-n2,n3=n2/60,n2=n2%60;
cout<<n3<<" "<<n2<<"\n";
return 0;
}
hhh
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,f,g,h; double i; cin>>a>>b>>c>>d; a=a60; c=c60; e=a+b; f=c+d; g=f-e; h=g/60; i=g%60; cout<<h<<" "<<i; return 0; }
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.