I like to save time quite literally, by wearing three watches on my wrist... Problem is they each give a different time. One watch is x minutes behind the actual time. One watch is x minutes ahead of the actual time. The last watch shows the actual time.
Problem is, I can't tell which watch has the correct time...
From the time displayed on each watch, determine the actual time. If it is not possible to determine the time, print "Look at the sun".
Three readings, separated by single space characters:
H1:M1 H2:M2 H3:M3
In each reading H1,H2,H3 represent the hours displayed (0 < H1,H2,H3 < 13), and
M1,M2,M3 represent the minutes displayed (0 <= M1,M2,M3 < 60). If the number of
minutes is less than 10, a leading 0 is prepended in the input. Similarly, is the number of hours is less than 10, a leading 0 is prepended in the input.
The correct time is HH:MM where HH:MM is the correct time. If no correct time can be determined, it displays
Look at the sun.
05:00 12:00 10:00
The correct time is 05:00
11:59 12:30 01:01
The correct time is 12:30
12:00 04:00 08:00
Look at the sun
Shortest code wins... No special penalties apply. Also, bear in mind that we're dealing with a 12-hour clock... I don't care about AM or PM... Imagine we're dealing with analogue watches...