#K46557. Majority Element
Majority Element
Majority Element
Given a list of integers, the majority element is defined as the element that appears more than \( \lfloor n/2 \rfloor \) times. In other words, it occurs more than half of the total number of elements. You are guaranteed that such an element exists in the input array. Your task is to find and output this majority element.
inputFormat
The input consists of two lines. The first line contains a positive integer \( n \) representing the number of elements. The second line contains \( n \) space-separated integers representing the array.
outputFormat
Output a single integer, which is the majority element of the array.
## sample3
3 2 3
3
</p>