新手光能
#include <bits/stdc++.h>
using namespace std;
int main(){
char x,y,x1,y1;
int a,b,c,d,e,f,cnt=0,jg0=0,jg1=0,jg2=0;
cin>>a>>x>>b>>y>>c>>d>>x1>>e>>y1>>f;
if(a-d<0){
a+=24;
jg0=a-d;
if(jg0<10)
cout<<0<<jg0<<":";
else
cout<<jg0<<":";
}
else if(a-d==0){
cout<<"00:";
}
else if(a-d>0){
jg0=a-d;
if(jg0<10)
cout<<0<<jg0<<":";
else
cout<<jg0<<":";
}
if(b-e<0){
b+=24;
jg1=b-e;
if(jg1<10)
cout<<0<<jg1<<":";
else
cout<<jg1<<":";
}
else if(b-e==0){
cout<<"00:";
}
else if(b-e>0){
jg1=b-e;
if(jg1<10)
cout<<0<<jg1<<":";
else
cout<<jg1<<":";
}
if(c-f<0){
c+=24;
jg2=c-f;
if(jg2<10)
cout<<0<<jg2;
else
cout<<jg2;
}
else if(c-f==0){
cout<<"00:";
}
else if(c-f>0){
jg2=c-f;
if(jg2<10)
cout<<0<<jg2;
else
cout<<jg2;
}
return 0;
}
0分 求大佬解答
55555
汤启恩在2020-09-27 20:06:33追加了内容
ding