Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/case-vaqt-mintaqalari

Time zones

Medium 1000 ms 64 MB 45%
Share

In Tashkent it is now $h$ hours $m$ minutes. Find what time it is at this moment in the city number $c$. The cities and their difference from Tashkent time:

$c$ City Difference
$1$ Tashkent $0$
$2$ Moscow $2$ hours behind
$3$ London $5$ hours behind
$4$ New York $10$ hours behind
$5$ Tokyo $4$ hours ahead
$6$ Delhi $30$ minutes ahead

The time is in $24$-hour format: 00:00 comes after 23:59. The date (day) is not printed.

Converting Tashkent time to the time of the chosen city

Input

One line with three integers: $c$, $h$ and $m$.

Output

The time as HH:MM: hours and minutes in two digits, with a leading $0$ if needed (for example, 09:05).

Note

$1 \le c \le 6$
$0 \le h \le 23$
$0 \le m \le 59$

Examples

Input #1
2 14 30
Output #1
12:30
Input #2
6 23 45
Output #2
00:15

Sign in to submit a solution

Signing up is free and takes a minute.