21263_SpeedRacer

2022-5-16 18:19| 发布者: Hocassian| 查看: 59| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-8950575834399-Problem List-采集的数据-后羿采集器.html

Pro.ID

21263

Title

Speed Racer

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21263

AC

1

Submit

2

Ratio

50.00%

时间&空间限制

  • Time Limit: 1500/500 MS (Java/Others)     Memory Limit: 131072/65536 K (Java/Others)
  • 描述

    Speed Racer must go go go rescue Trixie at the top of Mount Domo! He must get there as quickly as possible, but his Mach 5 only holds a specific amount of fuel, and there is no way to refuel on the way. Luckily, he knows precisely how much fuel is consumed at a particular speed, taking into account air resistance, tire friction, and engine performance. For a given speed v in kilometers per hour, the amount of fuel consumed in liters per hour is
    av4 + bv3 + cv2 + dv
    Assuming Speed travels at a constant speed, his tank holds t liters of fuel, and the top of Mount Domo is m kilometers away, how fast must he drive?

    输入

    The input will be one problem per line. Each line will contain six nonnegative floating point values representing a, b, c, d, m, and t, respectively. No input value will exceed 1000. The values of c, d, m, and t will be positive. There will always be a solution.
    The output should be formatted as a decimal number with exactly two digits after the decimal point, and no leading zeros. The output value should be such that the Speed Racer will not run out of fuel (so truncate, rather than round, the final result). You are guaranteed that no final result will be within 10−6 of an integer multiple of 0.01.

    输出

    Description
    Speed Racer must go go go rescue Trixie at the top of Mount Domo! He must get there as quickly as possible, but his Mach 5 only holds a specific amount of fuel, and there is no way to refuel on the way. Luckily, he knows precisely how much fuel is consumed at a particular speed, taking into account air resistance, tire friction, and engine performance. For a given speed v in kilometers per hour, the amount of fuel consumed in liters per hour is
    av4 + bv3 + cv2 + dv
    Assuming Speed travels at a constant speed, his tank holds t liters of fuel, and the top of Mount Domo is m kilometers away, how fast must he drive?
    Input
    The input will be one problem per line. Each line will contain six nonnegative floating point values representing a, b, c, d, m, and t, respectively. No input value will exceed 1000. The values of c, d, m, and t will be positive. There will always be a solution.
    The output should be formatted as a decimal number with exactly two digits after the decimal point, and no leading zeros. The output value should be such that the Speed Racer will not run out of fuel (so truncate, rather than round, the final result). You are guaranteed that no final result will be within 10−6 of an integer multiple of 0.01.
    Output
    The required output will be a single floating point value representing the maximum speed in kilometers per hour that Speed Racer can travel to reach the top of Mount Domo without running out of gas.
    Sample Input
    0.000001 0.0001 0.029 0.2 12 100
    2.8e-8 7.6e-6 0.0013 0.47 11.65 20.81
    1.559e-7 1.8195e-5 0.0022233 0.31292 58.902 85.585
    Sample Output
    134.41
    257.45
    142.65
    Source

    样例输入

    0.000001 0.0001 0.029 0.2 12 100
    2.8e-8 7.6e-6 0.0013 0.47 11.65 20.81
    1.559e-7 1.8195e-5 0.0022233 0.31292 58.902 85.585

    样例输出

    134.41
    257.45
    142.65

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部