码迷,mamicode.com
首页 > 其他好文 > 详细

hdu5954 Do not pour out

时间:2017-10-02 18:21:46      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:ber   lin   poi   blank   number   cas   href   ima   hdu   

You have got a cylindrical cup. Its bottom diameter is 2 units and its height is 2 units as well. 
The height of liquid level in the cup is d (0 ≤ d ≤ 2). When you incline the cup to the maximal angle such that the liquid inside has not been poured out, what is the area of the surface of the liquid? 

InputThe first line is the number of test cases. For each test case, a line contains a float-point number d.OutputFor each test case, output a line containing the area of the surface rounded to 5 decimal places.Sample Input

4
0
1
2
0.424413182

Sample Output

0.00000
4.44288
3.14159
3.51241

参考博客http://blog.csdn.net/danliwoo/article/details/53002695

hdu5954 Do not pour out

标签:ber   lin   poi   blank   number   cas   href   ima   hdu   

原文地址:http://www.cnblogs.com/--lr/p/7620486.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!