At a planet far away, an alien civilization is developing a rocket that works with solar energy. Assume this simplified model: The rocket is a point that moves vertically. Due to gravity, there is a constant downward acceleration of everywhere. At the rocket location, there are hours of daytime, followed by hours of nighttime, followed by hours of daytime, etc. During the daytime hours, the solar engines of the rocket provide an upward acceleration of . Will the rocket reach a vertical distance of ? If so, can you compute the first time to reach that point?
Input consists of several cases, each with , , and . Assume that and are real numbers such that , that is an integer number between 1 and 20, that is an integer number between 1 and 10000, and that all the units used are km and hours.
For every case, print “never” if the rocket will never
reach height
.
Otherwise, print the minimum time to reach that height, with four digits
after the decimal point. The input cases have no precision issues, nor
ill-conditioned cases. With the given cases, the answer will never be
larger that 200 hours.
Input
1 4 3 10 1 4 3 1000 2 5 7 10000 3.1 5.3 12 2000 3.1 5.3 12 200 6.15 9.95 19 1024 3.12 5.96 19 1481
Output
2.5820 41.8100 183.3596 never 13.7570 25.4604 59.0880