编程介的小学生 2019-06-27 21:42 采纳率: 20.5%
浏览 160

能在多长时间内驾驭HeavenHelix的预测,采用C语言的程序的编写的有效的设计的方式是什么

Problem Description
It's said that MJ was invited to perform for the God. Unfortunately, God was intoxicated in the excellent voice and the moonwalk of MJ. The second day, God said, "Let there be MJ and there was MJ." So MJ stayed, leaving his poor fans' hearts broken ... (Sounds unrealistic.)
However, when the third day passed, MJ missed his Neverland so much. His soulful songs conveyed the sorrow to the God. So God built a new Neverland in the Heaven on the forth day. It is said that there is a Roller Coaster called HeavenHelix in the new Neverland. It is so huge that the train seemed to be just a point. The train does uniform circular motion on horizontal plane(The radius is r,and the angular speed is ω rad/s),while it does uniform liner motion in vertical direction(The speed is v m/s)from the top to the bottom. To monitor the train, there is a camera installed on the bottom, where the center of the circle is located. The amount of energy the camera consumes is up to the distance between the train and itself: Assuming the distance is D meters, and in the very moment it travels ds meters, the camera should consume X*D*ds kJ energy from the God. When the Neverland was built, God distributed E kJ energy to the camera initially. God had calculated accurately to make sure that the train will be exactly on the bottom, as soon as the energy is used up. MJ wanted to know how long he can enjoy himself riding the HeavenHelix the sky. Can you help him?

Input
There are multiple cases. In each case, there will be only one line, containing five integers, r,ω, v, X and E (r≥0, ω≥0, v > 0, X > 0, E≥0), which have the same meaning mentioned above. All the numbers are smaller than 231. The input will be terminated by five zero, which were not need to be proceeded. There is a correct answer for each case.

Output
For each case, output the total time of the train ran before its stop in a single line. Present the answer in seconds, and accurate to 4 decimal places. You may assume that MJ can ride the HeavenHelix for at most 30 days.

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

Sample Output
0.4062

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的
    • ¥15 r语言蛋白组学相关问题