spoj#AVLVKT. Lovely Kitty
Lovely Kitty
Kitty is my sweet sister. Once in a morning I saw she is watching towards the clock. The clock is an analogue clock with two hands. The first one is an hour hand and the other one is a minute hand. While asking about her such attentive mode she replied “Brother can you tell me what will be the angle between the hour hand and the minute hand ?” I was like “huh!!”. Anyway I solved the problem after a while.
Now here is the task for you. I will give you the angle created between the hour hand and the minute hand. You need to find out the how many organizations of hour and minute hands are there that create such angle. For example if I say 90o then the answer will be – 2. The first one is 03:00 and 9:00.
Note that, the angle calculation should be done in clockwise direction but if you figure out an angle greater than 180o then deduct 180o from it. Because kitty do not understand the calculations of angle more than 180o .
Input
Input starts with an integer T that denotes number of test cases. Each of the next T lines contains a real number with one decimal place that denotes angle A.
Constraints
1 <= T <= 2000
1 <= A <= 180.0
Output
For each test case print the case number followed by the result according to the following format Case X: R where X denotes the case number and R denotes the result. See the sample for further clarification.
Example
Input:2
90.0
180.0Output:
Case 1: 2
Case 2: 2