编程介的小学生 2019-09-15 21:57 采纳率: 20.5%
浏览 159

Cut Pyramid 程序怎么来编写

Problem Description
Yaya and maomao have a cake. And the shape of the cake is a pyramid. As the following picture, AB=AC=AD=BC=BD=CD=N. Now they want to cut the cake to two same volume pieces as following picture. And EF is on the plane BCD and parallel to CD. GH is on the plane ACD and parallel to CD, too. Now give you the length of CE=L, and ask you to calculate the length of AG.

Input
Input contains multiple cases each presented on a separate line. Each line contains two integer numbers N(5<=N<=1000),L (0<=L<=N).

Output
For each test case, your program should output the length of AG hold 2 digits after the decimal point. If the answer is absent, output “Oh, my god!”.

Sample Input
1000 500
1000 200

Sample Output
500.00
Oh, my god!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

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