#C11215. Find the Single Number

    ID: 40507 Type: Default 1000ms 256MiB

Find the Single Number

Find the Single Number

Given an array of integers, where every element appears exactly twice except for one unique element, your task is to find that single number.

Formally, let the array be \(A = [a_1, a_2, \dots, a_n]\) where \(n = 2m+1\) for some integer \(m\). Every element in \(A\) appears exactly twice except for one element that appears only once. You are required to output that unique element.

Note: It is guaranteed that such an element exists.

inputFormat

The first line of input contains a single integer \(n\), which represents the number of elements in the array.

The second line contains \(n\) space-separated integers representing the array elements.

outputFormat

Output a single integer — the element that appears only once in the array.

## sample
3
2 2 1
1

</p>