## Problem 3: Cyclopian Cash

Alas, FurWear has failed to turn a profit from the mysterious land of Cyclopia. Upon realising that giants can wear clothing in larger sizes but not in smaller sizes, FurWear has decided to produce clothing sized according to the median of all the sizes, so as to fit approximately half the population. (Having clothing that fits the entire population would hardly make FurWear exclusive!)
Write a program to correct this silly oversight.

### Input

The first line consists of a single integer N (1 ≤ N ≤ 1000), the number of Oelfinn. The following N lines each contain a single integer ai (10 ≤ ai ≤ 1000), the size of clothing worn by the ith Oelfinn.

### Output

Output on a single line the median of all the sizes, to one decimal place.

```6
28
49
18
40
69
37```

### Sample Output

`38.5`

Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Author: jargon

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

• (0/0)
I keep trying edge cases, but never seem to get it wrong?
can someone just check my code over?

• (0/0)

In general, it's a good idea to take a very thorough look at the problem statement.

• (0/0)
what's wrong?

• (0/0)
instead of just saying "whats wrong", please give some context or other things on what is wrong with your program (i.e indexoutofbounds, memoryerror, timelimit error, etc.), please read this comment https://wcipeg.com/problem/p108ex9#comment9195

• (0/0)
The median of the numbers in sample 2 is not 38.5, meaning either they made a mistake (which I doubt) or the question is not asking for the median of i numbers. Help?

• (0/0)
do you know what an median is? You have made an mistake, the median is the middle number in a sorted list, and if there are 2 numbers, then take the average, here, when we sort the list we get 18 28 37 40 49 69, then we take the middle 2 numbers since there are an even number of numbers, which is 37 and 40, now we take the average of the numbers, so (37 + 40)/2 = 57/2 = 38.5, which is the correct answer

• (0/0)
Oops lol. I accidentally added in the 6 at the beginning when I calculated the median, meaning I had the numbers 6 18 28 37 40 49 and 69, meaning the median I calculated was 37. Sorry about the clumsy mistake.

• (0/0)
can someone update the PEG judge?
my submission works in python 3.4 but I believe the PEG Judge is on version 3.2.3
I think An Admin should update the PEG judge

• (1/0)
statistics.median is in python 3.4

• (0/0)
Can I please see my whole error?

• (0/0)
``Traceback (most recent call last):   File "a.out", line 2, in <module>     import statistics ImportError: No module named statistics``

• (0/0)
statistics.median was introduced in python 3.4 , a fairly recent update the judge doesn't use

• (1/0)

• (0/0)
Yes