A. 数字游戏

    Type: Default 1000ms 256MiB

数字游戏

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

乔治进入了幼儿园中班学习。 今天,他练习写数字1和9,但是他弄反了。

输出将nn中每个数字11替换为99,每个数字99替换为11后得到的整数。

给定一个由乔治写的三位整数nn

输入

输入一个正整数nn

输出

输出将nn中每个出现的数字1替换为9,每个出现的数字9替换为1后得到的整数。

119
991

样例解释

将个位数上的9替换为1,十位数上的1替换为9,百位数上的1替换为9。答案为991。

999
111

提示

111n999 111 \leq n \leq 999

输入数字中只包含数字1和9

粒子2024年11月上半月月赛

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2024-10-27 0:00
End at
2024-11-10 0:00
Duration
2 hour(s)
Host
Partic.
16