PEG 11/12 Programming Test 1 - October 19
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.
The first line consists of a single integer ~N~ ~(1 \le N \le 1\,000)~, the number of Oelfinn. The following ~N~ lines each contain a single integer ~a_i~ ~(10 \le a_i \le 1\,000)~, the size of clothing worn by the ~i~th Oelfinn.
Output on a single line the median of all the sizes, to one decimal place.
6 28 49 18 40 69 37