All Repeating Three Times Except One
easy
1. You are given an array of numbers. 2. All numbers occur thrice in the array except one. 3. You have to find the element that occurs once.
Constraints
1 <= n <= 10^9 1 <= a1,a2.. <= 10^9
Format
Input
A number n a1 a2.. n numbers
Output
A number
Example
Sample Input
4
1 1 1 2
Sample Output
2
Question Video