102480: [AtCoder]ABC248 A - Lacked Number

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

You are given a string $S$ of length exactly $9$ consisting of digits. One but all digits from 0 to 9 appear exactly once in $S$.

Print the only digit missing in $S$.

Constraints

  • $S$ is a string of length $9$ consisting of digits.
  • All characters in $S$ are distinct.

Input

Input is given from Standard Input in the following format:

$S$

Output

Print the only digit missing in $S$.


Sample Input 1

023456789

Sample Output 1

1

The string 023456789 only lacks $1$. Thus, $1$ should be printed.


Sample Input 2

459230781

Sample Output 2

6

The string 459230781 only lacks $6$. Thus, $6$ should be printed.

Note that the digits in the string may not appear in increasing order.

Input

题意翻译

有一个完全由数字构成的,长度为 $9$ 的字符串 $S$ ,保证 $S$ 的每个字符各不相同。输入 $S$ ,求在 $0$ 到 $9$ 的这 $10$ 个一位数中,哪个没有在 $S$ 中出现。输出这个没有出现的数。

Output

分数:100分

问题描述

给你一个长度为 9 的字符串 $S$,由数字组成。字符串 $S$ 中出现的数字从 09 ,仅缺失一个数字。

打印出字符串 $S$ 缺失的那个数字。

限制条件

  • $S$ 是一个长度为 $9$ 的字符串,由数字组成。
  • $S$ 中的所有字符都是不同的。

输入

输入通过标准输入给出,格式如下:

$S$

输出

打印出字符串 $S$ 缺失的那个数字。


样例输入 1

023456789

样例输出 1

1

字符串 023456789 缺失的数字是 $1$,因此需要打印出 $1$。


样例输入 2

459230781

样例输出 2

6

字符串 459230781 缺失的数字是 $6$,因此需要打印出 $6$。

注意字符串中的数字可能不是按升序排列的。

加入题单

算法标签: