0.2 Who's Missing ?
(RankList for this Question)
Score: 10pts
Time Limit: 2.00 sec
You are given all distinct positive numbers between \(1, 2, 3, ā€¦ , n.\) Your task is to find the missing number

Constraints
\( 2 \leq n \leq 2 * 10^{4} \)

Input Format
First line contains the size of the array ā€˜nā€™
Second line contains n ā€“ 1 numbers. Each number is distinct and in between 1 to n (inclusive)

Output Format
Print the missing number

Example 1
Input:
7
7 6 1 2 4 3

Output:
5

Explanation:
5 is missing from that sequence

Log In to solve the Question