文章目录
- AcWing 667. 游戏时间
- AC代码
AcWing 667. 游戏时间
本题链接:AcWing 667. 游戏时间
本博客给出本题截图:
AC代码
代码:
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (a == b)
cout << "O JOGO DUROU 24 HORA(S)";
else if (b > a)
cout << "O JOGO DUROU " << b - a << " HORA(S)";
else
cout << "O JOGO DUROU " << 24 - a + b << " HORA(S)";
return 0;
}