全部转换成秒 可以少很多很多次判断
#include <iostream>
using namespace std;
int main()
{
int a, b, c, d;
cin >> a >> b >> c >> d;
int start = a * 60 + b;
int end = c * 60 + d;
int spend_time = end - start;
if (spend_time <= 0) spend_time += 1440;
printf("O JOGO DUROU %d HORA(S) E %d MINUTO(S)",spend_time / 60, spend_time % 60);
return 0;
}