Reverse a Number - I
You are given a non-negative integer N. Reverse its digits and print the resulting number.
Leading zeroes in the reversed number are not printed. For example, reversing 1200 produces 21.
Input
The input contains only one integer N.
Output
Print the number obtained by reversing the digits of N, without labels or trailing spaces.
Example 1:
Input:
25
Output:
52
Explanation:
Reversing 25 gives 52.
Example 2:
Input:
1200
Output:
21
Explanation:
Reversing 1200 gives 21 because leading zeroes are not printed.
Now Your Turn!
Pick the correct output for the given inputInput:
54
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 0 <= N <= 5000