编程介的小学生 2019-09-01 22:07 采纳率: 20.5%
浏览 82

Who will be the HDU-START tonight?的编写

Problem Description

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.

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

Sample Input
1 2 1 3 3
0 0 0 0 0

Sample Output
0.204

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 运筹学排序问题中的在线排序
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥30 求一段fortran代码用IVF编译运行的结果
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥30 python代码,帮调试,帮帮忙吧