题意:
时针转过的角度:
分针转过的角度: 。
AC代码:
const int N = 1e6 + 50;
const double pi = acos(-1.0);
int main()
{
double a, b, h, m;
cin >> a >> b >> h >> m;
long double rad = pi * 2 * ((long double)h / 12.0 + ((long double)m / 60.0) / 12.0 - (long double)m / 60.0);
long double rsq = (long double)(a * a + b * b) - (long double)(2 * a * b) * cosl(rad);
printf("%20.20Lf\n", sqrtl(rsq));
return 0;
}