公式题
#include <stdio.h>
#include <math.h>
const double pi=3.141592653;
double d, H, e=0.00000001;
int main()
{
scanf("%lf%lf", &d, &H);
double a, b, c, h;
while ( scanf("%lf%lf%lf", &a, &b, &c), a > e && b > e && c > e )
{
a=tan(a/180*pi);
b=tan(b/180*pi);
c=tan(c/180*pi);
h=H+d*sqrt(2.0/(1/a/a+1/c/c-2/b/b))+0.49999999;
int t=h;
printf("%d\n", t);
}
return 0;
}