eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

Speed Racer

Speed Racer

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 \textbf{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 \textbf{v} in kilometers per hour, the amount of fuel consumed in liters per hour is \textbf{av^4 + bv^3 + cv^2 + dv} Assuming Speed travels at a constant speed, his tank holds t liters of fuel, and the top of Mount Domo is \textbf{m} kilometers away, how fast must he drive? \InputFile The input will be one problem per line. Each line will contain six nonnegative floating point values representing \textbf{a}, \textbf{b}, \textbf{c}, \textbf{d}, \textbf{m}, and \textbf{t}, respectively. No input value will exceed \textbf{1000}. The values of \textbf{c}, \textbf{d}, \textbf{m}, and \textbf{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 \textbf{10^\{−6\}} of an integer multiple of \textbf{0.01}. \OutputFile 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.
Лимит времени 1 секунда
Лимит использования памяти 256 MiB
Входные данные #1
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
Выходные данные #1
134.41
257.45
142.65
Источник ACM ICPC 2011 Pacific Northwest Region Programming Contest