Codeforces Beta Round 69 (Div. 2 Only)
B
Depression
Codeforces
1200
原题
← AC →
翻译中…

Do you remember a kind cartoon "Beauty and the Beast"? No, no, there was no firing from machine guns or radiation mutants time-travels!

翻译中…

There was a beauty named Belle. Once she had violated the Beast's order and visited the West Wing. After that she was banished from the castle...

翻译中…

Everybody was upset. The beautiful Belle was upset, so was the Beast, so was Lumiere the candlestick. But the worst thing was that Cogsworth was upset. Cogsworth is not a human, but is the mantel clock, which was often used as an alarm clock.

翻译中…

Due to Cogsworth's frustration all the inhabitants of the castle were in trouble: now they could not determine when it was time to drink morning tea, and when it was time for an evening stroll.

翻译中…

Fortunately, deep in the basement are lying digital clock showing the time in the format HH:MM. Now the residents of the castle face a difficult task. They should turn Cogsworth's hour and minute mustache hands in such a way, that Cogsworth began to show the correct time. Moreover they need to find turn angles in degrees for each mustache hands. The initial time showed by Cogsworth is 12:00.

翻译中…

You can only rotate the hands forward, that is, as is shown in the picture:

翻译中…

image

翻译中…

As since there are many ways too select such angles because of full rotations, choose the smallest angles in the right (non-negative) direction.

翻译中…

Note that Cogsworth's hour and minute mustache hands move evenly and continuously. Hands are moving independently, so when turning one hand the other hand remains standing still.

翻译中…

Input

翻译中…

The only line of input contains current time according to the digital clock, formatted as HH:MM ($00 \le$HH$\le 23$, $00 \le$MM$\le 59$). The mantel clock initially shows 12:00.

翻译中…

Pretests contain times of the beginning of some morning TV programs of the Channel One Russia.

翻译中…

Output

翻译中…

Print two numbers $x$ and $y$ — the angles of turning the hour and minute hands, respectively ($0 \le x,y \lt 360$). The absolute or relative error in the answer should not exceed $10^{-9}$.

翻译中…

Note

翻译中…

A note to the second example: the hour hand will be positioned exactly in the middle, between 4 and 5.

翻译中…

样例

Input #1
12:00
Output #1
0 0
InputCopy OutputCopy
Input #2
04:30
Output #2
135 180
InputCopy OutputCopy
Input #3
08:17
Output #3
248.5 102
InputCopy OutputCopy
题目信息
题号
80B
时间限制
1 s
内存限制
256 MB
标签
计算几何
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。