A Standalone KDE Plot
Calder Health compares how long different clinics keep patients waiting, and stacking several bucket charts is unreadable, so each clinic gets a smooth outline instead. Outlines with a long tail invite an eye to drift toward the tail, so the figure printed beside each one is the middle wait rather than the average — the middle barely moves when one patient waits all afternoon.
Task: Print the middle 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.
Output
One line with exactly two decimal places: the middle wait once the waits are in order. With an odd number of waits that is the single central one. With an even number there are two central waits, and the answer is the average of those two.
Example:
Input:
5
1
2
3
4
100
Output:
3.00
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