You are given a list of integers nums of size n+1. Each number in nums lies from 1 to n.
All numbers appear once, except x which appears twice.
Find the number x.
nums: [3, 1, 2, 4, 2]
Answer: 2
nums: [3, 1, 3, 2]
Answer: 3
The first line contains an integer âTâ denoting the number of test cases.
For each test case, the input has two lines:
For each test case, the output has one line containing the value of x.
2
4
3 1 2 4 2
3
3 1 3 2
2
3
1 <= T <= 100
1 <= n <= 10000