该学习了。。。
能不能说清楚点,加上奖励值...
能不能按照你的思路把楼主给出的测试数据给算一下(写一下过程).谢谢.
测试数据:
Beijing Tokyo 1329 F
Shanghai Wuhan 433 Y
0
#
输出:3158.
也就是说 假如 是F的时候 那么 是否小于250的时候又该另外考虑呢? 最近没上这个论坛 不好意思
The Angle
The interval angle between the hour hand and the minute hand is always among 0 degree and 180 degree(including 0 and 180 degree). For example, when it's 12 o'clock, the angle of the two hands is 0 while 6:00 is 180 degree. Try to calculate any degree when it's between 12:00 to 11:59.
Input
The input data are of various situations. Every team consists of two numbers : the first number stands for the hour(great than 0 and less than or equal to 12) and second represents the minute( among [0, 59]). The input ends when the two numbers are both zeros.
Output
Print out the minimum angle between the two hands with the normal time form outputed.
Input Sample
12 012 306 03 00 0 Output Sample
At 12:00 the angle is 0.0 degrees.
At 12:30 the angle is 165.0 degrees.
At 6:00 the angle is 180.0 degrees.
At 3:00 the angle is 90.0 degrees.