[恢]hdu 2134

2011-12-15 06:49:09

地址:http://acm.hdu.edu.cn/showproblem.php?pid=2134

题意:把直径为R的圆平均分为3份,问r1和r2。简单数学。

代码:

# include <stdio.h>
# include <math.h>


int main ()
{
int R ;
while (~scanf ("%d", &R))
{
if (R <= 0) break ;
printf ("%.3lf %.3lf\n", R/sqrt(3), R*sqrt(2.0/3.0)) ;
}
return 0 ;
}



posted @ 2012-01-06 15:53  Seraph2012  阅读(126)  评论(0编辑  收藏  举报