100 atcoder#ABC202B. [ABC202B] 180°
[ABC202B] 180°
Score : points
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
0
with a0
, each1
with a1
, each6
with a9
, each8
with an8
, and each9
with 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.
0601889
6881090
Rotating 0601889
degrees results in 6881090
.
86910
01698
01010
01010
may remain the same.