Repair the clock

aws4_request&X-Amz-Date=20220411T080047Z&X-Amz-Expires=86400&X-Amz-Signature=b8dd42e8760d0ab532906ed885626fe987e415eff928f4c59f1991f6723b44d0&X-Amz-SignedHeaders=host&x-id=GetObject.png

The clock has been broken and needs to be repaired. We see that it was stuck at displaying a certain time and we know the number of minutes it has been stuck. Our task is to forward the clock to the correct time.

You are given 3 numbers. The stuck hour and minute, which is followed by the number of minutes it has been stuck.

Print the correct hour:minute the clock should show.

Input

Output

14
28
75

15:43

14
28
1440

14:28

Note that the stuck minutes can indicate minutes that are larger than 24 hours, but the output needs to always be in the range 0:0 - 23:59.

Hint

You can use the remainder operator % to make sure the values for hours and minutes stay in the appropriate range

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue