#t480. 逆序输出一个多位数
逆序输出一个多位数
Reverse a Multi-digit Number
Problem Description
Given a natural number (), print its digits in reverse order (leading zeros are allowed).
Input Format
One natural number ().
Output Format
Print its digits reversed (leading zeros are allowed).
Sample Input
123500
Sample Output
005321
Constraints
.
Hint
- Read the number, then peel off its digits one by one from the least significant end (modulo 10 and divide by 10), printing each digit as you go — this naturally produces leading zeros when the original ended in zeros.
- Alternatively, read it as a string and print it backwards.