#B4302. Find the Integer with Odd Occurrences
Find the Integer with Odd Occurrences
Find the Integer with Odd Occurrences
Odd: An integer that cannot be evenly divided by $2$.
For example, $3$ and $5$ are odd; whereas $4$ and $6$ are not odd.
You are given $n$ integers and it is guaranteed that exactly one of them appears an odd number of times. Your task is to identify and output this integer.
Example: For $n=7$ with the list: $6$, $2$, $4$, $6$, $4$, $2$, $6$, the integer $6$ appears odd number of times, so the output should be $6$.
inputFormat
The first line contains an integer $n$, representing the number of integers.
The second line contains $n$ space-separated integers.
outputFormat
Output the integer that appears an odd number of times.
sample
7
6 2 4 6 4 2 6
6
</p>