Adding Gridlines for Easier Reading
Pike Street Studio adds faint dashed gridlines to charts a reader is expected to take numbers off, rather than merely glance at. Without them the eye has to carry a height sideways to the axis unaided, which people do badly. The lines are drawn pale and dashed on purpose: solid dark ones compete with the data for attention and end up being read as part of it. The caption gives the middle reading.
Task: Print the middle reading: the one landing exactly in the centre once every reading is put in order. The number of readings is always odd, so exactly one reading is in the centre and nothing has to be averaged.
Input
The first line holds an odd integer n, the number of readings. Each of the next n lines holds one reading, possibly with decimals, and they arrive in no particular order. n is at least 1.
Output
One line holding the middle reading, printed as Python prints the number it read: twenty comes out as 20.0 and two and a quarter as 2.25, neither rounded nor padded.
Example:
Input:
3
10
30
20
Output:
20.0
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