42. Missing Number
EasyMathBit Manipulation
The array contains n distinct numbers from the range 0..n. Print the one number missing from the range.
Input format
Line 1: n Line 2: n integers
Output format
The missing number.
Example 1
Input
3 3 0 1
Output
2
Example 2
Input
2 0 1
Output
2
Constraints
1 ≤ n ≤ 10⁴
Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.
Loading the MyLoginn IDE…