#Lutece0049. Clock
Clock
Migrated from Lutece 49 Clock
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Clock is invented by ancient Arabic engineers and which contributes to build the concept of accurate time for us human beings and even could be essential tool that widely used in industry, business and our routine lives. Nevertheless, the ideology of clock turns out to be quite simply that even make sense to little kids. We could hardly imagine that how do Arabic wisdom come up with such idea to indicate time only by two or three fingers. The other day, hhb are asking lxh and Hysramp to play his newly invented game describe as follow. hhb randomly change the time of his lovely alarm clock then ask lxh and Hysramp to tell the degree between hour finger and minute finger. lxh seems quite gifted playing it while Hysramp does not. When Hysramp fails to answer hhb, hhb smiles to Hysramp. And Hysramp smiles to you, an ace programmer.
Input
The first line of the input contains one integer , which indicate the number of test cases. Each test case contains one indicating the time on hhb’s clock in the form of :. ()
Output
One line for each test case contains only one number indicating the answer. An integer or an irreducible fraction indicated the degree between hour finger and minute finger.
Samples
1
00:00
0
Resources
电子科技大学第七届ACM程序设计大赛 初赛