HDOJ 5387 Clock 水+模拟】的更多相关文章

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…
题目传送门 /* 模拟:这题没啥好说的,把指针转成角度处理就行了,有两个注意点:结果化简且在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 **…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5387 比较水的一道题目,也是自己单翘的第一道题目吧,题意就是找到给定时间时钟三个指针之间的夹角, 需要注意的问题分数的表示方法,辗转相除求最大公因子,同时除去, 此外还应注意夹角为锐角. #include<stdio.h> #include<cmath> #include<algorithm> using namespace std; int gcd(int a,int b…
CodeForces.158A Next Round (水模拟) 题意分析 校赛水题的英文版,坑点就是要求为正数. 代码总览 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <sstream> #include <set> #include <map> #include <queue>…
CodeForces71A. Way Too Long Words (水模拟) 题意分析 题怎么说你怎么做 没有坑点 代码总览 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <sstream> #include <set> #include <map> #include <queue>…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
[题目链接]: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…
Elevator Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56481    Accepted Submission(s): 30942 Problem Description The highest building in our city has only one elevator. A request list is made…
题意: 给你一个格式为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…
A. Broken Clock time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a broken clock. You know, that it is supposed to show time in 12- or 24-hours HH:MM format. In 12-hours format…