|| ||Code Submission Evaluation System
CSES Problem Set
Task | Statistics
CSES - Missing NumberCSES - Missing Number
|Time limit:||1.00 s
||Memory limit:||512 MB|
You are given all numbers between $1,2,\ldots,n$ except one. Your task is to find the missing number.
The first input line contains an integer $n$.
The second line contains $n-1$ numbers. Each number is distinct and between $1$ and $n$ (inclusive).
Print the missing number.
- $2 \le n \le 2 \cdot 10^5$
2 3 1 5