编程介的小学生 2017-04-08 16:13 采纳率: 20.5%
浏览 826
已采纳

Tilt Cylinder

Given a closed right cylinder water tank and its radius is R and its height is H, and there is V(unknown) volume of water in it. Now the cylinder is α degrees inclined and the height of the water is h. Please note that the tank has a lid so the water will not flow out through the top. Your task is to calculate V.

Tilt Cylinder
Input

There are multiple test cases.
For each test case: there is one line containing 4 float-point numbers: R, H, h and α (0 <= α <= 90, 1 <= R, H, h <= 100).
The test cases are reasonable, which means it wouldn't happen α = 90 and H < h such situations.

Output

For each test case output one line: V, the volume of the water. Any solution with a relative or absolute error of at most 1e-6 will be accepted.

Sample Input

1.000000 1.000000 1.000000 0.000000
1.000000 1.000000 1.000000 90.000000
2 1 2 45.0
Sample Output

1.5707963
3.1415926
7.5769518

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-04-22 15:54
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口