All problems

Cumulative Distribution With ecdfplot

hardPythonSeabornecdfplot

Calder Health is held to a published waiting-time promise, and the useful chart for that is not a bucket chart but a climbing line: at any wait along the bottom, its height is the share of patients seen by then. A reader can put a finger on the promised wait and read the share straight off. The report prints that one share as text so it cannot be misread.

Task: Print the share of patients seen by the promised wait.

Input

The first line holds one integer n, the number of patients. Each of the next n lines holds one wait, a number on its own. One final line, after all the waits, holds the promised wait.

Output

One line with exactly two decimal places: the share of waits that are less than or equal to the promised wait. It is a share between 0.00 and 1.00, not a percentage. A wait exactly equal to the promise counts as met.

Example:

Input:
5
1
2
3
4
5
3

Output:
0.60

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…