题目描述
一到时间,就会有特殊情况,把特殊情况搞明白要。
样例
#include<iostream>
using namespace std;
int main()
{
int a,b,c,d,n,m;
cin>>a>>b>>c>>d;
m=a*60+b;
n=c*60+d;
if(n>m)
cout<<"O JOGO DUROU "<<(n-m)/60<<" HORA(S) E "<<(n-m)%60<<" MINUTO(S)"<<endl;
else if(n<m)
cout<<"O JOGO DUROU "<<(24*60+n-m)/60<<" HORA(S) E "<<(24*60+n-m)%60<<" MINUTO(S)"<<endl;
if(a==c&&b==d)
cout<<"O JOGO DUROU 24 HORA(S) E 0 MINUTO(S)"<<endl;
return 0;
}