CF80B.Depression
普及-
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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:

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.
你还记得那部可爱的卡通片《美女与野兽》吗?不,不,里面可没有机关枪扫射,也没有辐射变异人穿越时空!
故事里有一位名叫贝儿(Belle)的美丽姑娘。有一次,她违反了野兽的禁令,擅自闯入西翼。此后,她便被逐出了城堡……
所有人都很沮丧:美丽的贝儿很沮丧,野兽也很沮丧,烛台先生(Lumiere)同样沮丧。但最糟糕的是——科斯沃斯(Cogsworth)也沮丧了!科斯沃斯并非人类,而是一只壁炉架上的座钟,常被用作闹钟。
由于科斯沃斯情绪低落,城堡中所有居民都陷入了困境:他们再也无法判断何时该喝早茶,何时该去傍晚散步了。
幸运的是,在城堡最底层的深处,躺着一只数字钟,以 HH:MM 格式显示当前时间。如今,城堡居民面临一项艰巨任务:他们必须将科斯沃斯的时针和分针(形似胡须)分别旋转适当的角度,使科斯沃斯准确显示正确时间。此外,他们还需分别求出这两根“胡须针”所需旋转的角度(单位:度)。科斯沃斯初始显示的时间为 12:00。
你只能向前旋转指针(即按顺时针方向),如图所示:

由于整圈旋转(360° 的整数倍)会产生多个满足条件的角度,因此请选取最小的非负角度(即沿正向旋转的最小角度)。
注意:科斯沃斯的时针与分针匀速、连续转动;两针彼此独立运动——在旋转其中一根指针时,另一根保持静止。
输入格式
The only line of input contains current time according to the digital clock, formatted as HH:MM (00≤HH≤23, 00≤MM≤59). The mantel clock initially shows 12:00.
Pretests contain times of the beginning of some morning TV programs of the Channel One Russia.
输入仅包含一行,表示数字钟当前显示的时间,格式为 HH:MM(00≤HH≤23,00≤MM≤59)。壁炉钟初始时刻显示为 12:00。
预测试数据包含俄罗斯第一频道部分早间电视节目开始时间。
输出格式
Print two numbers x and y — the angles of turning the hour and minute hands, respectively (0≤x,y<360). The absolute or relative error in the answer should not exceed 10−9.
输出两个数字 x 和 y —— 分别为时针和分针的旋转角度(0≤x,y<360)。答案的绝对或相对误差不应超过 10−9。
输入输出样例
输入#1
12:00
输出#1
0 0
输入#2
04:30
输出#2
135 180
输入#3
08:17
输出#3
248.5 102
说明/提示
A note to the second example: the hour hand will be positioned exactly in the middle, between 4 and 5.
第二个示例的说明:时针将恰好位于 4 和 5 的正中间。
输入解题思路,AI测评打分。不知道怎么写?