DWITE Online Computer Programming Contest
November 2002

Problem 2

The Five M's of Stats 101

Five commonly reported statistic figures (that notably start with the letter "m") include the:

  1. mean
  2. median
  3. mode
  4. maximum
  5. minimum

Your job is the calculate these five figures from a given set of values.

Input

The first line of the input will contain the integer n (0 < n ≤ 1000), which represents the number of values in the set. The next n lines will contain the real values (-1000 ≤ value ≤ 1000) of the set, each on a separate line.

Output

The output will contain five lines of data, each representing the statistic figure, listed in the order above. Each figure should be rounded to two decimal places, left justified. Note: There will be only one mode in the set of values.

Sample Input

10
1
2
3
4.5
3
6
7.5
8
9
10

Sample Output

5.40
5.25
3.00
10.00
1.00

All Submissions
Best Solutions


Point Value: 5
Time Limit: 1.00s
Memory Limit: 32M
Added: Mar 25, 2009

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

Comments (Search)

It's quiet in here...