Cook is stuck on the moment hand of a monster clock. To escape from this clock he needs to get onto the hour hand which has a leave entryway. 

Since the moment hand and hour hand are not associated anytime, culinary specialist will clearly need to take a leap. Since he needs least dangers, he decides to hop on the hour hand so the point he needs to cover is least conceivable. 

You will be given a check time in UTC design signifying season of gourmet specialist’s bounce and you need to figure the base point that culinary expert needs to cover while finishing the hop. For reasons unknown culinary specialist times his bounce just when the quantity of minutes is a various of 5. 



The primary line of the information contains a solitary whole number T meaning the quantity of experiments. The portrayal of T experiments follows. 

The primary line of each experiment contains a string signifying time in UTC design (for example 10:20 for example 10 hours and 20 minutes) 



For each experiment, print a solitary line signifying the littlest point of bounce. 







Model Input 





Model Output 

50 degree 

5 degree 

105 degree 



In the subsequent case, when the hour hand arrives at 2 it begins moving towards 3 with the death of consistently, consequently when the moment hand focuses 10 minutes, the hour hand has just secured some point towards 3. In this situation the two edges made by hour and moment hand are 355 and 5 degrees. Since cook will bounce as an afterthought with least point, he picks the one with 5-degree edge.



March Long Challenge 2021 Solutions

April Long Challenge 2021 Solutions

Codechef Long Challenge Solutions

February Long Challenge 2021

1. Frog Sort Solution Codechef

2. Chef and Meetings Solution Codechef

3. Maximise Function Solution Codechef

4. Highest Divisor Solution Codechef

5. Cut the Cake Challenge Solution Codechef

6. Dream and the Multiverse Solution Codechef

7. Cell Shell Solution Codechef

8. Multiple Games Solution Codechef

9. Another Tree with Number Theory Solution Codechef

10. XOR Sums Solution Codechef

11. Prime Game Solution CodeChef

12. Team Name Solution Codechef

January Long Challenge 2021

November Challenge 2020 SOLUTION CodeChef

October Lunchtime 2020 CodeChef SOLUTIONS


Related :

Related :

Leave a Comment

4 × 1 =