hoj2134 Cuts the cake

来源:互联网 发布:linux deploy 安装 编辑:程序博客网 时间:2024/05/15 02:00
//超级水
#include<stdio.h>#include<math.h>#define pi acos(-1)int main(){    int r;    double r1,r2,s;    while(scanf("%d",&r),r){        s=pi*r*r;        s=s/3.0;        r1=sqrt(s/pi);        r2=sqrt((2*s)/pi);        printf("%.3lf %.3lf\n",r1,r2);    }    return 0;}

原创粉丝点击