uva579 ClockHands
错的很狗血
View Code
#include<stdio.h> #include<math.h> int main() { double m, n, t; char ch; while(scanf("%lf%c%lf",&m,&ch,&n) && (m||n)) { if(n == 0) m = m*30; else m = m*30+0.5*n; n = n*6; t = fabs(m-n); if(t>180) t = 360.0-t; printf("%.3lf\n",t); } return 0; }