#t480. 逆序输出一个多位数

逆序输出一个多位数

Reverse a Multi-digit Number

Problem Description

Given a natural number aa (0≤a≤1090 \le a \le 10^9), print its digits in reverse order (leading zeros are allowed).

Input Format

One natural number aa (0≤a≤1090 \le a \le 10^9).

Output Format

Print its digits reversed (leading zeros are allowed).

Sample Input

123500

Sample Output

005321

Constraints

0≤a≤1090 \le a \le 10^9.

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.