Bored in Class
All submissions for this problem are available.
You are sitting in your class getting bored and wondering how long will it be before you can get back to your room and contine solving the
current long challenge @ codechef. You look at the clock and it shows the time as HH:MM (24-hour format). Just to pass the time you
consider the problem of what maximal time the clock could display S seconds from now.
The first line will contain an integer T, denoting the number of test cases.
Each test case contains two lines.
The first line of each test case will contain a string of length four, depicting the current time on the clock, HHMM.
The second line contains an integer S.
1 <= T <= 100
00 <= HH <= 23
00 <= MM <= 59
00 <= S <= 1000000000
For each test case, print one line depicting the maximal time on the clock after S seconds.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, JAR, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions