mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
ddd34a4f1c
2000-2099
20 lines
387 B
C++
20 lines
387 B
C++
#include<stdio.h>
|
|
#include<math.h>
|
|
#include<algorithm>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int c;
|
|
double h,m,s,ans;
|
|
scanf("%d",&c);
|
|
while(c--)
|
|
{
|
|
scanf("%lf%lf%lf",&h,&m,&s);
|
|
if(h>=12) h-=12.0;
|
|
m = m + s/60.0;
|
|
h = h + m/60.0;
|
|
ans = fabs(h*30.0 - m*6.0);
|
|
printf("%d\n",(int)min(ans,360.00-ans));
|
|
}
|
|
}
|