C++ 代码
#include<iostream>
using namespace std;
int main()
{
int a, b, c, d, t;
cin >> a >> b >> c >> d;
if ( a >= c && b >= d )
t = ( c + 24 ) * 60 + d - a * 60 - b;
else
t = c * 60 + d - a *60 - b;
printf("O JOGO DUROU %d HORA(S) E %d MINUTO(S)", t / 60, t % 60);
return 0;
}