#2389. 丢失的数字(Missing Number)

    ID: 2389 Type: FileIO (miss) 1000ms 256MiB Tried: 10 Accepted: 4 Difficulty: 9 Uploaded By: Tags>CSES Introductory Problems

丢失的数字(Missing Number)

Description

你会得到1、2、…,n之间的n-1个数,你的任务是找到丢失的数字。

Format

Input

第一个输入行包含一个整数n。

第二行包含n - 1个数字。每个数字都是不同的,介于1和n之间(包括1和n)。

Output

打印缺失的数字。

Samples

5
2 3 1 5
4

Limitation

  • 2n21052≤n≤2 * 10^5
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Statistics

Related

In following contests:

Introductory Problems

In following homework:

训练题单一