The Designer
来源:互联网 发布:php网站数据库在哪里 编辑:程序博客网 时间:2024/05/29 09:08
The Designer
Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0
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 likeFigure1 .
* 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.
At first,
Each small circles are added by the following principles.
* you should add the small circles in the order like
* every time you add a small circle, you should make sure that it is tangented with the other circles (2 or 3 circles) like
The teacher wants to know the total amount of pigment he would use when he creates his master piece.
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 integer t(1≤t≤1200) , 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 (1≤R≤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 integerN (1≤N≤10 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).
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
25 414 51
Sample Output
3.141593.14159
阅读全文
0 4
- The Designer
- hdu 6158 The Designer
- to designer about the database
- Cascading Style Sheets: The Designer's Edge
- HDU 6158 The Designer(笛卡尔定理)
- Designer
- Designer
- Walkthrough: Creating an XML Schema with the XML Designer
- Developer to Designer: GUI Design for the Busy Developer
- Evaluating the trend of designer shoes for kids
- Changes to the Design View in SharePoint Designer 2013
- 2017 CCPC网络赛 1009 The Designer(未完待续)
- HDU 6158 The Designer(笛卡尔定理+韦达定理)
- hdu 6158 The Designer && 计蒜客 Finding the Radius for an Inserted Circle 笛卡尔定理应用
- 给大家看的设计书 The Non-Designer's Design Book
- Use Microsoft SharePoint Designer 2010 to customize the list view 1
- Use Microsoft SharePoint Designer 2010 to customize the list view 2
- Use Microsoft SharePoint Designer 2010 to customize the list view 3---Parameter and Filter
- Palindrome Function
- instanceof的使用: 对象与构造函数在原型链上是否有关系
- 交换排序-冒泡排序
- The Karting
- hdu2955(01背包)
- The Designer
- 笔记
- [2017-08-19 17:02:13
- HTTP状态码详解
- POJ 3233Matrix Power Series
- Floyd算法学习(最短路径)
- Graph Of Zhuper
- Bluez D-BUS API应用参考资源
- HDU 6152