hdu2076--时钟夹角

    技术2022-06-12  57

    #include "stdio.h" #include "math.h" int main() { int h, m, s; int n,th0; double th; scanf("%d",&n); while (n--) { scanf("%d %d %d",&h,&m,&s); th = fabs( (6*m+ (double)s/10)-( (double)(60*m+s)/120+30*(h) ) ); if(th>180) th = 360-th; th0 = floor(th); printf("%d/n",th0); // printf("%.2f/n",th); } return 0; }


    最新回复(0)