DMOPC '14 Contest 1 P1 - Median Mark

View as PDF

Submit solution


Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Help Mr. Sidhu, your favourite math teacher, find the median mark on a class test. The first line will consist of N (1 \le N \le 1000), the number of marks. This line will be followed by N lines with each containing an integer mark (0 \le\text{mark}\le 999). Round to the nearest integer if necessary. We use standard mathematical conventions for rounding.

Sample Input 1

2
50
100

Sample Output 1

75

Sample Input 2

3
40
99
100

Sample Output 2

99

Comments

There are no comments at the moment.