当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6158:The Designer

题目描述
Nowadays, little $haha$ got a problem from his teacher.His teacher wants to design a big logo for the campus with some circles tangent with each other. And now, here comes the problem. The teacher want to draw the logo on a big plane. You could see the example of the graph in the $Figure 1$



At first, $ haha$'s teacher gives him two $big$ circles, which are tangent with each other. And, then, he wants to add more small circles in the area where is outside of the small circle, but on the other hand, inside the bigger one (you may understand this easily if you look carefully at the $Figure 1$.

Each small circles are added by the following principles.
* you should add the small circles in the order like $Figure 1$.
* every time you add a small circle, you should make sure that it is tangented with the other circles (2 or 3 circles) like $Figure 1$.
    
The teacher wants to know the total amount of pigment he would use when he creates his master piece.$haha$ doesn't know how to answer the question, so he comes to you.

$Task$
The teacher would give you the number of small circles he want to add in the figure. You are supposed to write a program to calculate the total area of all the small circles.
输入解释
The first line contains a integer $t (1 \leq t \leq 1200)$, which means the number of the test cases. For each test case, the first line insist of two integers $R_1$ and $R_2$ separated by a space ($1 \leq R \leq 100$), which are the radius of the two big circles. You could assume that the two circles are internally tangented. The second line have a simple integer $N$ ($ 1 \leq N \leq 10\ 000\ 000$), which is the number of small circles the teacher want to add.
输出解释
For each test case:
Contains a number in a single line, which shows the total area of the small circles. You should out put your answer with exactly 5 digits after the decimal point (NO SPJ).
输入样例
2
5 4
1
4 5
1
输出样例
3.14159
3.14159
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6158

最后修改于 2020-10-25T23:28:52+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
8000/4000MS(Java/Others) 32768/32768K(Java/Others)