2017 CCPC网络赛 1009 The Designer(未完待续)

老师希望设计校园标志,需要用到多个相切的圆。任务是编写程序计算添加特定数量小圆后的总面积。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



The Designer

                                                       Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
                                                                                    Total Submission(s): 1049    Accepted Submission(s): 34

Problem Description

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 theFigure1



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 theFigure1.

Each small circles are added by the following principles.
* you should add the small circles in the order like Figure1.
* every time you add a small circle, you should make sure that it is tangented with the other circles (2 or 3 circles) likeFigure1.
    
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.
 

Input

The first line contains a integert(1t1200), which means the number of the test cases. For each test case, the first line insist of two integersR1 and R2 separated by a space (1R100), 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 integerN (1N10 000 000), which is the number of small circles the teacher want to add.
 

Output

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).
 

Sample Input

2 5 4 1 4 5 1
 

Sample Output

3.14159 3.14159




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值