uva579 计算几何入门
2013-03-30 20:37
435 查看
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=101&problem=520&mosmsg=Submission+received+with+ID+11532034
题意:给出时针和分针,输出夹角。。。
题意:给出时针和分针,输出夹角。。。
#include <cstdio> #include <cmath> #include <iostream> using namespace std; #define min(a,b) ((a)<(b)?(a):(b)) int main() { int a, b; while (scanf("%d:%d", &a, &b), a || b) { if (a == 12) a-= 12; double x, y; y = b; x = a * 5.0 + y / 60.0 * 5.0; double cha = fabs(x - y); if (cha > 30.0) cha = 60 - cha; printf("%.3lf\n", cha * 6.0); } return 0; }
相关文章推荐
- uva 12300 Smallest Regular Polygon(计算几何)
- UVALive 7749 Convex Contour (计算几何)
- UVa 10250 The Other Two Trees (计算几何)
- POj 2002 UVALive - 3047 C - Squares 【计算几何+二分求解】
- UVA 1331 Minimax Triangulation [最优三角剖分] [dp] [计算几何]
- uva 12426 Counting Triangles 计算几何
- UVA 10522 - Height to Area(计算几何)
- UVA 10652 - Board Wrapping 简单计算几何 凸包
- UVa 11178 - 计算几何初步
- UVa 10213 How Many Pieces of Land ? (计算几何+大数)
- UVALive 5908 Tracking RFIDs 【计算几何】
- UVA 10652 (计算几何 凸包)
- UVA 10256 (计算几何 凸包)
- POJ 1264 UVA 109 简单的计算几何
- 计算几何入门4--poj2187Beauty Contest
- uva 10668(计算几何+二分)
- POJ 计算几何入门题目推荐
- POJ 计算几何入门题目推荐
- uva 1342 欧拉定理(计算几何模板)
- UVALive 6092 Catching Shade in Flatland --枚举+几何计算