#P1307. Reverse the Digits of an Integer
Reverse the Digits of an Integer
Reverse the Digits of an Integer
Given an integer \(N\), reverse the digits to form a new number. The new number should be in the conventional form of an integer, meaning that unless the original integer is zero, the most significant digit of the reversed number must not be zero. For example, if \(N = 100\), the reversed number should be \(1\) instead of \(001\).
Note: The input number is provided as a single integer, and its reversed form should not have any leading zeros.
inputFormat
The input consists of a single line containing an integer \(N\).
outputFormat
Output the integer obtained by reversing the digits of \(N\) according to the described rules.
sample
123
321