#P10984. [2015杭电多校]Clock

    ID: 10126 传统题 1000ms 256MiB 尝试: 1 已通过: 1 难度: 2 上传者: 标签>CF1100普及-有理数精确运算欧几里得算法

[2015杭电多校]Clock

Clock

Problem Description

Give a time.(hh:mm:ss),you should answer the angle between any two of the minute.hour.second hand Notice that the answer must be not more 180 and not less than 0

Input

There are TT(1≤T≤104)(1\leq T \leq 10^4) test cases for each case,one line include the time 0≤hh<240\leq hh<24,0≤mm<600\leq mm<60,0≤ss<600\leq ss<60

Output

for each case,output there real number like A/B.(A and B are coprime).if it's an integer then just print it.describe the angle between hour and minute,hour and second hand,minute and second hand.

Sample Input

4
00:00:00
06:00:00
12:54:55
04:40:00

Sample Output

0 0 0
180 180 0
1391/24 1379/24 1/2
100 140 120

Hint

每行输出数据末尾均应带有空格

Author

SXYZ

Source

2015 Multi-University Training Contest 8