2009-03-01 09:31:13來源不明
95高市資訊學科能力競賽 繩子上吃草的牛
橢圓面績!
/*************************************************************/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
main()
{
double pi=2*acos(0.0),x,y;
while(scanf("%lf %lf",&x,&y)==2)
{
double longlong,shortshort,ans;
longlong=sqrt((y/2)*(y/2)-(x/2)*(x/2));
shortshort=x/2+(y-x)/2;
ans=shortshort*longlong*pi;
printf("%.3lf\n",ans);
}
return 0;
}