There are integers in an array . All but one integer occur in pairs. Your task is to find the number that occurs only once.
The first line of the input contains an integer , indicating the number of integers. The next line contains space-separated integers that form the array .
% ( is an odd number)
Output , the number that occurs only once.
1 1 2
0 0 1 2 1
In the first input, we see only one element (1) and that element is the answer.
In the second input, we see three elements; 1 occurs at two places and 2 only once. Thus, the answer is 2.
In the third input, we see five elements. 1 and 0 occur twice. The element that occurs only once is 2.