cuts the cake
http://acm.hdu.edu.cn/showproblem.php?pid=2134
#include<stdio.h>
#include<math.h>
#define M 3.1415926
int main()
{
int n;
while(scanf("%d",&n),n)
{
double s1,s2,s3,r1,r2;
s1= M*n*n;
s2=s1/3;
s3=s2*2;
r1=sqrt(s2/M);
r2=sqrt(s3/M);
printf("%.3lf %.3lf\n",r1,r2);
}
return 0;
}

浙公网安备 33010602011771号