#abc202b. B - 180°
B - 180°
Score : points
问题描述
你得到一个字符串 ,其中包含字符 0、1、6、8 和 9。
将字符串 旋转 度,并打印旋转后的结果。换句话说,对 应用以下操作并输出得到的新字符串:
- 反转字符串 。
- 将每个
0替换为0,每个1替换为1,每个6替换为9,每个8替换为8,每个9替换为6。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a string consisting of 0, 1, 6, 8, and 9.
Rotate degrees and print the result. In other words, apply the following operations on and print the resulting string:
- Reverse .
- Replace each
0with a0, each1with a1, each6with a9, each8with an8, and each9with a6.
Constraints
- consists of
0,1,6,8, and9.
Input
Input is given from Standard Input in the following format:
Output
Print the result of rotating degrees.
Sample Input 1
0601889
Sample Output 1
6881090
Rotating 0601889 degrees results in 6881090.
Sample Input 2
86910
Sample Output 2
01698
Sample Input 3
01010
Sample Output 3
01010
may remain the same.
update @ 2024/3/10 09:14:16