ALIENCLK - Clock hands on a different planet

On planet Aberus, the day is broken into 16 hours. Each hour contains 80 minutes. An Aberitian child is using the clock face to learn about angles in her maths class. The teacher asks her to work out what angle is held between the two hands of the clock at different times of day, and report the answer in degrees. She'd rather use a program to calculate this, can you help her?

Input

The first input line contains a positive integer representing the number of test instances. Each subsequent line contains a clock time in the format HH:MM.

Output

For each of the clock times given, report the angle (between 0 and 359 degrees) that is held between the two hands of the clock, rounded to one decimal place. Note: If the angle is more than 180, subtract the angle from 360.

Example

Input:
3
12:00
06:00
13:15 Output:
90.0
135.0
130.8

Added by:handee
Date:2021-06-18
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NCSHARP JULIA PYPY3

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.