#K12816. Find the Unique Integer

    ID: 23775 Type: Default 1000ms 256MiB

Find the Unique Integer

Find the Unique Integer

You are given an array of integers in which every integer appears exactly twice except for one integer that appears exactly once. Your task is to identify and output the unique integer.

For each test case, the first number provided is n where the total number of integers in the array is 2n+1. The following line contains these 2n+1 integers separated by spaces. It is guaranteed that exactly one number is unique.

Note: The integers may include negative numbers.

inputFormat

The input is read from stdin and consists of multiple test cases:

  • The first line contains a single integer T representing the number of test cases.
  • For each test case, the first line contains an integer n (with 0 ≤ n) indicating that the array will have 2n+1 integers.
  • The second line of the test case contains 2n+1 space-separated integers.

outputFormat

For each test case, output the unique integer on a new line to stdout.

## sample
1
1
2 2 1
1

</p>