文件名称:clock
介绍说明--下载内容均来自于网络,请自行研究使用
【问题描述】普通时钟都有时针和分针,在任意时刻时针和分针都有一个夹角,并且假设时针和分针都是连续移动的。现已知当前的时刻,试求出该时刻时针和分针的夹角A(0≤A≤180)。
注意:当分针处于0分和59分之间时,时针相对于该小时的起始位置也有一个偏移角度。
【输入形式】从标准输入读取一行,是一个24小时制的时间。格式是以冒号(“:”)分隔的两个整数m(0≤m≤23)和n(0≤n≤59),其中m是小时,n是分钟。
【输出形式】向标准输出打印结果。输出一个浮点数A,是时针和分针夹角的角度值。该浮点数保留3位小数值。
【输入样例】
8:10
【输出样例】
175.000
【样例说明】8:10那个时刻时针与秒针的夹角是175.000度-【Descr iption】 general problem of the clock and the clock minute hand has, at any time there is a clock and the angle between minute hand and hour hand and minute hand is the assumption that continuous movement. Now know the current moment, try to derive the moment and the minute hand clockwise angle A (0 ≤ A ≤ 180).
Note: When the minute hand at 0 hours and 59 minutes between when the clock relative to the start position of the hour there is a migration perspective.
】 【Input form to read from standard input line, is a 24-hour time system. Format is a colon-separated (":") two integer m (0 ≤ m ≤ 23) and n (0 ≤ n ≤ 59), in which m is the hour, n is the minutes.
】 【Output format print results to standard output. Output of a floating-point A, is the angle between the clock and the minute hand angle. Floating-point numbers to retain the value 3.
】 【Input sample
8:10
【Output sample】
175.000
【Descr iption】 8:10 sample clock with second hand at all times that the angle is 175.00
注意:当分针处于0分和59分之间时,时针相对于该小时的起始位置也有一个偏移角度。
【输入形式】从标准输入读取一行,是一个24小时制的时间。格式是以冒号(“:”)分隔的两个整数m(0≤m≤23)和n(0≤n≤59),其中m是小时,n是分钟。
【输出形式】向标准输出打印结果。输出一个浮点数A,是时针和分针夹角的角度值。该浮点数保留3位小数值。
【输入样例】
8:10
【输出样例】
175.000
【样例说明】8:10那个时刻时针与秒针的夹角是175.000度-【Descr iption】 general problem of the clock and the clock minute hand has, at any time there is a clock and the angle between minute hand and hour hand and minute hand is the assumption that continuous movement. Now know the current moment, try to derive the moment and the minute hand clockwise angle A (0 ≤ A ≤ 180).
Note: When the minute hand at 0 hours and 59 minutes between when the clock relative to the start position of the hour there is a migration perspective.
】 【Input form to read from standard input line, is a 24-hour time system. Format is a colon-separated (":") two integer m (0 ≤ m ≤ 23) and n (0 ≤ n ≤ 59), in which m is the hour, n is the minutes.
】 【Output format print results to standard output. Output of a floating-point A, is the angle between the clock and the minute hand angle. Floating-point numbers to retain the value 3.
】 【Input sample
8:10
【Output sample】
175.000
【Descr iption】 8:10 sample clock with second hand at all times that the angle is 175.00
(系统自动生成,下载前可以参看下载内容)
下载文件列表
clock (2).txt
clock.c
clock.txt
clock.c
clock.txt