eolymp
bolt
Try our new interface for solving problems
Məsələlər

Tampopo Machine

Tampopo Machine

"Today is another day of endless, tedious work to put a tampopo on sashimi..." Yaruo works in a sashimi (sliced raw fish) factory. His job is to put tampopos on sashimi packages everyday. Tired of this menial job, he decided to develop a tampopo machine to do the job instead of him. The tampopo machine has the following properties. Sashimi packages are put on a conveyor belt and move from left to right. The width of a package is \textbf{W} and the interval between two adjacent packages is \textbf{D}. The machine has \textbf{N} magic hands placed above the conveyor belt at regular intervals of \textbf{M}. These magic hands put tampopos every \textbf{T} seconds. In initial state, the right end of the first package is under the leftmost magic hand. The magic hands start putting a tampopo as soon as he turns on the power of the machine. The conveyor belt moves one unit length per one second. \includegraphics{https://static.e-olymp.com/content/e9/e958bfb9a929810e3c2f43bfed803123847e3176.jpg} Unfortunately, after building the machine, Yaruo noticed that there exist some packages with no tampopos. Calculate the ratio of packages with no tampopos for him. When a magic hand puts a tampopo on the left or right end of a package, you can assume that the tampopo is on the package. \InputFile The input consists of \textbf{5} integers, \textbf{W}, \textbf{D}, \textbf{N}, \textbf{M} and \textbf{T} which are described in the problem statement. (\textbf{1} ≤ \textbf{W}, \textbf{D}, \textbf{N}, \textbf{M}, \textbf{T} ≤ \textbf{1000000000}) \OutputFile Output the ratio of packages with no tampopos in a line. The absolute error should be less than or equal to \textbf{10^\{-9\}}.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
1 1 1 1 1
Çıxış verilənləri #1
0.000000000
Mənbə The 2011 35th Annual ACM Programming Contest Winter Camp