Problem LinkDifficultySimple PrerequisitesBasic programming language constructions ProblemFind all times in the HH:MM format, such that the absolute value of the angle between hours' and minutes' hands is equal to the given value. ExplanationLet us iterate through all possible values of times and check the absolute value of the angle between hours' and minutes' hands. This angle is calculated as the difference between two angles, namely, A  the angle of hours' hand and B  the angle of minutes' hand. Let us define the rules for calculating the angles of the hands:
So, the solution consists of iterating all the possible values of times and checking the corresponding absolute angles. In total there are only 60*12 = 720 possible times. Setter's SolutionCan be found here Tester's SolutionCan be found here
This question is marked "community wiki".
asked 04 Oct '15, 04:28

I did it though partially(60 pts) using relative angular speed of minute hand w.r.t hour hand . answered 13 Oct '15, 23:23

I did it with graph and precomputation :D Link to my solution : https://www.codechef.com/viewsolution/8420150 ;) answered 12 Oct '15, 21:06

Python(2.7) solution using dictionaries (HASHMAP) :) Without using PYPY.
answered 12 Oct '15, 23:25

Can anyone tell me why I got TLE in 3rd Test Case? My Solution link: https://www.codechef.com/viewsolution/8391242 answered 12 Oct '15, 23:26

Just got the equation from the wikipedia, and implemented it. Starting from 0719. For me it was the easiest problem in the set :D. I hardly spent any time for that,kinda cute problem. Enjoyed it :P Here's my code https://www.codechef.com/viewsolution/8372841 answered 13 Oct '15, 00:27

answered 13 Oct '15, 00:57

check this video editorial : https://www.youtube.com/watch?v=VeESbUgz2fY answered 13 Oct '15, 21:23

check this video editorial : https://www.youtube.com/watch?v=VeESbUgz2fY answered 13 Oct '15, 21:24

my code is working well for integer angle but generating error for non integer angle at codechef. Please see my code and tell me where I'm wrong. Solution(code) answered 19 Oct '15, 14:27

Hi can any body please explain how to implement this "a time value is considered valid if the angle between the clock's hands for that value and the angle Chef's friend has described differ by less than 1/120 degrees." i have tried like below
for input angle 30 i am getting 05:30 and 06:30 so can anybody please tell me how to implement the above condition? answered 28 Oct '15, 01:46
