6614: ABC202 —— B - 180°
[Creator : ]
Description
You are given a string $S$ consisting of 0, 1, 6, 8, and 9.
Rotate $S\ 180$ degrees and print the result. In other words, apply the following operations on $S$ and print the resulting string:
Rotate $S\ 180$ degrees and print the result. In other words, apply the following operations on $S$ and print the resulting string:
- Reverse $S$.
- Replace each 0 with a 0, each 1 with a 1, each 6 with a 9, each 8 with an 8, and each 9 with a 6.
Input
Input is given from Standard Input in the following format:
$S$
$S$
Output
Print the result of rotating $S$ $180$ degrees.
Constraints
$1≤∣S∣≤10^5$
$S$ consists of 0, 1, 6, 8, and 9.
$S$ consists of 0, 1, 6, 8, and 9.
Sample 1 Input
0601889
Sample 1 Output
6881090
Rotating 0601889 $180$ degrees results in 6881090.
Sample 2 Input
86910
Sample 2 Output
01698
Sample 3 Input
01010
Sample 3 Output
01010
HINT
相同题目:ABC202。