LCC/Moose '19 Contest 2 J1 - Professor McGonagall

View as PDF

Submit solution

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

Author:
Problem type

Recently, Professor McGonagall has noticed increased rates of cheaters in the Slytherin house. Can you help her find what mark the cheaters got so she can give them all a 0?

The only hint she provided you with is that:

All the cheaters got the most common mark on the test.

Note: there will only be 1 most common mark.

Input Specification

A single line containing N {(1 \le N \le 10^{3})}, the number of students in her class.

The next N lines will contain the i_{th} student's mark M (0 \le M \le 10^3).

Output Specification

On the first line, output the cheaters' mark.

Sample Input

4
12
23
97
23

Sample Output

23

Comments

There are no comments at the moment.