Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

BINCLOCK - Binary clock

Jan znalazł w internecie specyficzny rodzaj zegara - zegar binarny. Nie minęło dużo czasu, a zaczął się interesować tego rodzaju zegarami. Po pewnym czasie Jan uświadomił sobie, że nie jest on jednak pewny czy zamienia normalne godziny na format binarny poprawnie, więc poprosił Cię, żebyś napisał mu program, który sprawdza czy zrobił to poprawnie czy też nie.

Opis i wyjaśnienie działania zegara binarnego: http://pl.wikipedia.org/wiki/Zegar_binarny

Input

W pierwszej linii znajduje się liczba testów t (t<101).

Każdy test składa się z 24 cyfr (4 linie po 6 cyfr), które są reprezentacją zegara binarnego. Po każdym teście jest jedna pusta linia.

Output

Dla każdego testu jedna linia z godziną w następującym formacie: godz:min:sec lub ERROR jeśli czas jest niepoprawny.

Przykład

Wejście:

3
000000
000000
000000
010101

000000
010101
001011
100110

000001
000001
000001
000001

Wyjście:
01:01:01
14:25:36
ERROR


Added by:Piotr Kąkol
Date:2009-12-21
Time limit:10s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi

hide comments
2014-12-05 02:02:15 Piotr KÄ…kol
For:
000000
010000
100000
000000

You print 24:00:00 instead of ERROR.
2014-12-04 20:50:00 Kurt Schwind

Not sure why I'm failing the tests with this submission:
13060024

I even wrote a script that tests every combination and compared the output to a script that passed and the output was identical.
2014-08-29 19:45:34 its_time_to_code
thanks :)
2014-08-26 02:55:18 Piotr KÄ…kol
@Rajat Sharma - If minutes are greater than 59 you should print "ERROR".
2014-08-21 17:31:20 its_time_to_code
why i'm getting W.A. ?
2014-01-16 19:39:00 Piotr KÄ…kol
You print e.g. 103 seconds/minutes/hours instead of ERROR.
2014-01-16 16:54:29 Linghui Liu
@piotr, what am I missing in 10881431?
2012-02-18 10:56:31 Jander
@Zorro - Well done! I'm going to have to go back and look at my solution again now :-)
2011-04-26 19:01:41 Piotr KÄ…kol
That's the error:
Traceback (most recent call last):
File "/sources/tested.py", line 26, in
File "/sources/tested.py", line 12, in BINCLOCK
File "", line 1
0b0001
^
SyntaxError: unexpected EOF while parsing
2011-04-26 11:42:04 512_I
Getting NZEC dont know y?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.