All problems

Simulating Random Delivery Times

easyPythonNumPynp.random.uniform

Fenwick Retail's courier contract promises a delivery somewhere between 20 and 40 minutes after the order is placed, and gives no reason to expect any part of that window more than another. The planner therefore models a delivery as equally likely at any moment in the window: 20 minutes exactly is possible, 40 is the cutoff and is never reached, and every value in between has the same chance. To try out a new depot layout she simulates five deliveries, and the run has to be repeatable for the team meeting, so NumPy's classic global random stream is set from a recorded seed before the first delivery is drawn.

Task: Print the five simulated delivery times.

Input

One line holding a single integer, the seed.

Output

One line holding the five simulated times in the order drawn, separated by single spaces, each written with exactly two decimal places.

Example:

Input:
1

Output:
28.34 34.41 20.00 26.05 22.94

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…