#CCBCMCHIN0000042. Thời gian trận đấu (Game Time)
Thời gian trận đấu (Game Time)
Game Time
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
A game starts at hour and ends at hour on a 24-hour clock. It may cross midnight and lasts at most 24 hours. Equal start and end hours represent 24 hours. Compute the game duration.
Input
One line contains two integers : starting and ending hours.
Output
Print exactly O JOGO DUROU X HORA(S) where is the duration in hours.
Subtasks
Subtask 1 (20 points): Hours are in [0,23], with the ending hour strictly later than the starting hour. Subtask 2 (30 points): Hours are in [0,23], with the ending hour strictly earlier than the starting hour. Subtask 3 (50 points): Both hours are in [0,23], including equal hours.
Examples
Example 1
Input
22 1
Output
O JOGO DUROU 3 HORA(S)
Explanation
The game lasts 2 hours to midnight and 1 more hour afterward, totaling 3.
Example 2
Input
7 7
Output
O JOGO DUROU 24 HORA(S)
Explanation
Equal hours represent 24 hours under the problem convention.