HDU 5387 Clock】的更多相关文章

[题目链接]:pid=5387">click here~~ [题目大意]给定一个时间点.求时针和分针夹角,时针和秒针夹角,分针和秒针夹角 模拟题,注意细节 代码: #include<bits/stdc++.h> using namespace std; inline int read(){ int c=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} whil…
题意:给一个时间,求三个时针之间的夹角,分数表示. 解法:算算算.统一了一下分母. 代码: #include<stdio.h> #include<iostream> #include<algorithm> #include<string> #include<string.h> #include<math.h> #include<limits.h> #include<time.h> #include<std…
题意: 给你一个格式为hh:mm:ss的时间,问:该时间时针与分针.时针与秒针.分针与秒针之间夹角的度数是多少. 若夹角度数不是整数,则输出最简分数形式A/B,即A与B互质. 解析: 先计算出总的秒数 S=hh∗3600+mm∗60+ss 由于秒钟每秒走1°, 所以当前时间,秒钟与12点的度数为 S%360 由于分针每秒走 0.1°, 既然已经计算出总秒数,那么当前时间,分针与12点的度数为 S/10%360 由于时针每秒走(1/120)°.那么当前时间.时针与12点的度数为 S/120%360…
题目传送门 /* 模拟:这题没啥好说的,把指针转成角度处理就行了,有两个注意点:结果化简且在0~180内:小时13点以后和1以后是一样的(24小时) 模拟题伤不起!计算公式在代码内(格式:hh/120, mm/120, ss/120) */ /************************************************ * Author :Running_Time * Created Time :2015-8-13 13:04:31 * File Name :H.cpp **…
题 Description Give a time.(hh:mm:ss),you should answer the angle between any two of the minute.hour.second hand Notice that the answer must be not more 180 and not less than 0   Input There are $T$$(1\leq T \leq 10^4)$ test cases for each case,one li…
Clock Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 500    Accepted Submission(s): 176 Problem Description Given a time HH:MM:SS and one parameter , you need to calculate next time satisfying…
Weird Clock Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3109    Accepted Submission(s): 1137 Problem Description A weird clock marked from 0 to 59 has only a minute hand. It won't move unti…
Clock Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 316    Accepted Submission(s): 215 Problem Description Give a time.(hh:mm:ss),you should answer the angle between any two of the minute.hou…
Clock Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5870    Accepted Submission(s): 1872 Problem Description There is an analog clock with two hands: an hour hand and a minute hand. The two ha…
题意:给定一个开始时间和一个角度,问你下一个时刻时针和分针形成这个角度是几点. 析:反正数量很小,就可以考虑暴力了,从第一秒开始暴力,直到那个角度即可,不会超时的,数目很少,不过要注意精度. 代码如下: #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #inclu…