P23085 [AtCoder] [ABC030B] Clock Dial
普及-
题目描述

Problem Description

There is an analog clock showing $ n $ hours and $ m $ minutes. Calculate the smaller angle between the hour hand and the minute hand in degrees.

Input Format

The input is given from the standard input in the following format:

$ n $ $ m $

  • The first line contains two integers $n,\ m\ (\ 0\ ≦\ n\ ≦\ 23,\ 0\ ≦\ m\ ≦\ 59\ )$ separated by a space, representing the time on the analog clock.

Output Format

Output the angle between the hour hand and the minute hand on the first line. The absolute or relative error should be within $ 10^{-4} $.

Do not forget the newline at the end.

Sample Input and Output

Sample Input #1

15 0

Sample Output #1

90

Sample Input #2

3 17

Sample Output #2

3.5

Sample Input #3

0 0

Sample Output #3

0

Sample Input #4

6 0

Sample Output #4

180

Sample Input #5

23 59

Sample Output #5

5.5000

Notes/Hints

Sample Explanation 1

The hour hand and minute hand of the clock are as shown in the following diagram: https://arc045.contest.atcoder.jp/img/abc/030/7b98dfb77e0c940707fc2a225d666edf/B-sample1.png The red arrow is the minute hand, and the orange arrow is the hour hand.

Sample Explanation 2

The hour hand and minute hand of the clock are as shown in the following diagram: https://arc045.contest.atcoder.jp/img/abc/030/62139091c4d63599ada45a8b3656e323/B-sample2.png

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
15 0
样例输出
90