#C. Missing Number-CSES Introductory Problems

    文件IO (miss) 1000ms 256MiB

Missing Number-CSES Introductory Problems

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

Description

You are given all numbers between 1, 2,...,n except one. Your task is to find the missing number.

Format

Input

The first input line contains an integer n.

The second line contains n - 1 numbers. Each number is distinct and between 1 and n (inclusive).

Output

Print the missing number.

Samples

5
2 3 1 5
4

Limitation

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

腾冲市教师培训

未認領
狀態
已結束
題目
6
開始時間
2026-2-27 0:00
截止時間
2026-3-6 23:59
可延期
24 小時