QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 2048 MB Puntuación total: 100

#1371. 缺失的数字

Estadísticas

你在教幼儿园!你在白板上按顺序写下了从 $1$ 到 $n$ 的数字。当你没注意的时候,其中一个学生擦掉了一个数字。

你能告诉我们那个淘气的学生擦掉了哪个数字吗?

输入

输入的第一行包含一个整数 $n$ ($2 \le n \le 100$),表示你写下的数字个数。

输入的第二行包含一个数字字符串,表示你写下的数字(减去被擦掉的那个)。这个字符串中没有空格。保证该字符串包含从 $1$ 到 $n$ 的所有数字(按顺序排列),除了被学生擦掉的那个数字。

输出

输出一个整数,即那个调皮的学生擦掉的数字。

样例

输入格式 1

5
1235

输出格式 1

4

输入格式 2

10
1234568910

输出格式 2

7

输入格式 3

15
1234567891012131415

输出格式 3

11

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.