All problems

A Seaborn Box Plot Per Category

easyPythonSeabornboxplot

Ironbark Manufacturing measures the same part on several machines and charts one summary box per machine, so a supervisor can see at a glance which machine is drifting. The line across the middle of each box is the middle measurement, not the average, because one badly seated part should not drag the whole box. The shift report quotes that middle line for machine A.

Task: Print the middle measurement for machine A.

Input

The first line holds one integer n, the number of measurements. Each of the next n lines holds a machine name and one measurement, separated by a single space. Machine names contain no spaces, and a machine may appear on many lines.

Output

One line with exactly two decimal places: the middle of machine A's own measurements once they are in order. With an odd count that is the single central measurement; with an even count it is the average of the two central ones. Names are matched exactly, so a is a different machine from A.

Example:

Input:
5
A 10
A 20
A 30
B 100
B 200

Output:
20.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

Discussion

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

Loading comments…