hdu2134(切蛋糕)
来源:互联网 发布:淘宝魔兽金币 编辑:程序博客网 时间:2024/04/28 16:04
Problem Description
Ice cream took a bronze medal in the Beijing match. Liu sir is very very happy. So he buys a cake for them. kiki is a child who likes eating, so the task of cuting cake was given to kiki. kiki is also a mischievous child. She wants to cut the cake in a different way. This is introduced in the figure below.
But there is a difficult problem.which is how to make each preson get equally many cake. kiki is not good at match, so she wants you help her solve this problem.
But there is a difficult problem.which is how to make each preson get equally many cake. kiki is not good at match, so she wants you help her solve this problem.
Input
Input contains multiple test cases. Each line is a case. Each case contains only one integer R which is the radius. The input is terminated with a R of 0.
Output
For each test case, you should printf two numbers r2 and r1 in a line, accurate up to 3 decimal places, separate them by one space.
Sample Input
10155250
Sample Output
5.774 8.1658.660 12.2472.887 4.08214.434 20.412
#include<stdio.h>#include<math.h>int main(){ double R,r1,r2; while (scanf("%lf",&R)==1&&R) { r2=R*sqrt(2.0/3); r1=R*sqrt(1.0/3); printf("%.3lf %.3lf\n",r1,r2); } return 0;}
- hdu2134(切蛋糕)
- 切蛋糕
- 切蛋糕
- 面试题,切蛋糕!
- HD ACM 切蛋糕
- 21275:切蛋糕
- 二分搜索-切蛋糕
- 题目1551:切蛋糕
- 切蛋糕(SOJ1739)
- hdu1722 切蛋糕
- NYOJ 869 切蛋糕
- NYOJ869---切蛋糕
- sdust练习题-切蛋糕
- 6,1 切蛋糕
- vijos P1020 切蛋糕
- hdoj-1722切蛋糕
- vijos1020—切蛋糕
- CSU - 1750 切蛋糕
- Hibernate get和load区别
- CF 174(div2) D
- Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
- poj_2992 Divisors
- mybatis generator 使用
- hdu2134(切蛋糕)
- 什么时候使用CSS与Table
- S3C6410存储器映射(内存地址等)
- C#中数字金额转换大写金额方法
- 在Java代码规范中为什么不能出现System.out.println()
- NS 2.35 柯志亨书-实验5笔记-置信区间
- 必须声明表变量 "@P0"
- 直接拿来用!最火的Android开源项目(完结篇)
- 对java多线程的理解