#include <cstdio>
#include <cmath>
const double P=acos(-1.0);
int main()
{
int n;
double x,y,w,h,k;
scanf("%d",&n);
while(n--)
{
scanf("%lf%lf",&x,&y);
w=x/(x+2*sqrt(x*x/4+y*y));
h=y;
k=h*w;
while(k>=0.000001)
{
h-=2*k;
k=h*w;
}
printf("%13.6lf\n",P*(y-k/w));
if(n)printf("\n");
}
return 0;
}
375 - Inscribed Circles and Isosceles Triangles
最新推荐文章于 2016-07-13 23:05:14 发布