Problem list
Log in
#r03226 · Online Judge > GoldOJ

Find the Missing Number

Bronze III 2.0 s 1024 MB

One number from $1$ to $n$ is missing. Given the remaining $n-1$ numbers (in any order), print the missing one.

Input

Line 1: $n$ ($2 \le n \le 100$). Line 2: the $n-1$ present numbers.

Output

Print the missing number.

Example 1

Input
5
1 2 4 5
Output
3
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code