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

建议使用的浏览器:

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

2288:Who will be the HDU-START tonight?

题目描述
Here goes the Problem:
-------------------------------------------------------------------------------------------------------------------------------------------------------

As the picture shown above, there is funnel upside the container. You can assume the bottom of the container is a square. Initially, there are some water in the funnel, the funnel's bottom diameter is x, y stands for the top diameter of the water. Z means the height of the water. The container's height is h, and its bottom is a d*d size square.
The question is: when all the water in the funnel has leaked out, what's the height of the water in the container?
Tips: The Volume of a frustum of a cone(圆台) is:,s1 and s2 are the area of the 2 faces, and H is the height.
输入解释
There will be multiple input sets. Input for each set is five positive integers x, y, z, h and d(x<y, 1<=x, y, z, h, d <= 10000) . The final input set is followed by a line containing five 0s, indicating end of input.
输出解释
Output for each input set should be one line, containing a number H, the height of the water in the container, accurate up to 3 decimal places.
输入样例
1 2 1 3 3
0 0 0 0 0
输出样例
0.204
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-2288

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

共提交 0

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