Census
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
In the main building, there are residents, each with an age ranging from to years. One day, the faculty decided to determine which age is the most common among the residents. Naturally, this task has been assigned to you.
Your goal is to find the age that appears most frequently and output it.
Input
The first line contains the integer , representing the number of residents in the main building (). The second line contains integers, each representing the age of a resident. Each age is an integer between and .
Output
Output the age that occurs most frequently. If there is a tie, output the youngest age.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 3K
Acceptance rate 35%