eolymp
bolt
Try our new interface for solving problems
Problems

Rain Fall

Rain Fall

\includegraphics{https://static.e-olymp.com/content/51/51c0530f4836a56adc6cef90d15504258bae0c8d.jpg} Rainfall is measured in millimeters. The rain is collected in a vertical transparent tube with millimeter markings, and once the rain has stopped falling, one can check the height of the water in the tube. In our problem, the tube unfortunately has a leak at height \textbf{L} millimeters (mm). If the water level is above the leak then water drains from the tube at a rate of \textbf{K} millimeters per hour (mm/h). We want to figure out how much rain fell during a particular rainfall. We assume that the tube is high enough that it does not overflow. We also assume that rain falls at an (unknown) uniform rate during a rainfall, and that water does not evaporate from the tube. The height of the leak itself is also negligible. \InputFile One line with five positive numbers: \textbf{L K T_1 T_2 H}, where \textbf{L} is where the leak is (mm) \textbf{K} is the rate at which water leaks (mm/h) \textbf{T_1} is the duration of the rainfall (h) \textbf{T_2} is the time between the end of the rainfall and the observation of the water level (h) \textbf{H} is the water level in the tube when we observe it (mm) Each number is at least \textbf{0.01} and at most \textbf{1000.00}, and each is given with two decimals. \OutputFile One line with two floating point numbers \textbf{F_1 F_2} where \textbf{F_1} is the smallest rainfall in millimeters that would result in the given observation, and \textbf{F_2} is the largest rainfall in millimeters that would result in the given observation. Print the answer with absolute error \textbf{10^\{-9\}}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
80.00 0.50 2.00 1.50 80.00
Output example #1
80.000000000 80.759403280
Source 2009 Nordic Collegiate Programming Contest, October 3, Problem D