#C2925. Find the Unique Number

    ID: 46295 Type: Default 1000ms 256MiB

Find the Unique Number

Find the Unique Number

Given an array of integers \(a_1, a_2, \dots, a_n\), where every element appears exactly twice except for one that appears only once, determine the unique integer. This problem can be efficiently solved using the bitwise XOR operation, since for any integer \(x\), \(x \oplus x = 0\) and \(x \oplus 0 = x\). Use this property to cancel out the duplicate numbers and identify the unique element.

inputFormat

The first line of the input contains an integer \(n\), which is the number of elements in the array. The second line contains \(n\) space-separated integers.

outputFormat

Output a single integer, representing the number that occurs only once in the array.

## sample
7
2 3 5 3 2 4 4
5