Which is missing?

Write a program that reads sequences with all the numbers between 1 and
n but one, and tells which one is missing.

Input

Input consists of several sequences. Every sequence begins with a number
n between 1 and 10⁴ followed by n − 1 natural numbers. Every number
between 1 and n appears exactly once, except one of them, which is
missing.

Output

For every sequence, print the missing number.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T12:21:46.163Z

© Jutge.org, 2006–2026.
https://jutge.org
