EasyRating 900
The Missing Number
The array holds n − 1 distinct numbers from 1 to n. Print the missing one.
Input
n, then n − 1 integers.
Output
The missing number.
Sample 1
Input
5 1 2 4 5
Output
3
Sample 2
Input
2 2
Output
1
Output appears heren, then n − 1 integers.
The missing number.
5 1 2 4 5
3
2 2
1
Output appears here