#C265. Find the Unique Element
Find the Unique Element
Find the Unique Element
Given an array of integers in which every element appears exactly twice except for one unique element, your task is to find and print that unique element. The problem can be solved using the properties of the XOR operator: for any integer x, x \oplus x = 0 and x \oplus 0 = x. If the array is represented as \(a_1, a_2, \ldots, a_n\), then applying XOR on all elements will cancel out the duplicate ones, leaving only the unique element.
inputFormat
The input is given via standard input (stdin). The first line contains a single integer n representing the number of elements in the array. The second line contains n space-separated integers.
outputFormat
Output the unique element that appears only once. The output should be written to standard output (stdout).
## sample7
2 3 2 4 4 5 5
3