#include <iostream>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
int sum = 0;
int flag = 1;
while(1)
{
if(a == b&&flag == 1)
{
cout << "O JOGO DUROU 24 HORA(S)";
break;
}
flag = 0;
if(a == b&&flag == 0)
{
cout << "O JOGO DUROU "<< sum << " HORA(S)";
break;
}
a++;
sum+=1;
if(a >= 24)
a%=24;
}
return 0;
}
光用if好像还简单点