D. [ABC317B] MissingNo

    传统题 1000ms 256MiB

[ABC317B] MissingNo

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

Naohiro had N+1N+1 consecutive integers, one of each, but he lost one of them.

The remaining NN integers are given in arbitrary order as A1,,ANA_1,…,A_N. Find the lost integer.

The given input guarantees that the lost integer is uniquely determined.

Constraints

  • 2N1002 \le N \le 100
  • 1Ai10001 \le A_i \le 1000
  • All input values are integers.
  • The lost integer is uniquely determined.

Input

The input is given from Standard Input in the following format:

NA1 A2 AnN \\ A_1\ A_2\ \cdots A_n

Output

Print the answer.


3
2 3 5
4

Naohiro originally had four integers, 2,3,4,52,3,4,5, then lost 4 4, and now has 2,3,52,3,5.

Print the lost integer, 44.


8
3 1 4 5 9 2 6 8
7

16
152 153 154 147 148 149 158 159 160 155 156 157 144 145 146 150
151

Programming exercise on 21 August

未参加
状态
已结束
规则
XCPC
题目
4
开始于
2024-8-21 17:30
结束于
2024-8-21 18:30
持续时间
1 小时
主持人
参赛人数
2