#K73467. Find the Single Number

    ID: 33982 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 element that appears only once, your task is to identify and output that single, unique element.

Your algorithm must have a linear runtime complexity, i.e. O(n), and use constant extra space.

For example, consider the array [2, 2, 1]. The answer is 1 because 1 appears only once while the others appear twice.

inputFormat

The first line contains an integer n representing the number of integers in the array.

The second line contains n space-separated integers.

outputFormat

Output a single integer which is the unique element in the array.

## sample
3
2 2 1
1

</p>