I :: Speed Racer

Time Limit: 5 Seconds    Memory Limit: 65536 KB

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
Submit

Source: 2011 Pacific Northwest Region Programming Contest