#P1307. [NOIP 2011 普及组] 数字反转
[NOIP 2011 普及组] 数字反转
Description
Given an integer , reverse its digits to obtain a new number. The new number should also follow the usual form of integers: unless the original number is zero, the leading digit of the reversed number must not be zero (see Sample 2).
Input Format
A single integer N.
Output Format
A single integer, which is the reversed number.
123
321
-380
-83
Hint
【Constraints】
.
NOIP 2011 Junior Problem 1.
Translated by ChatGPT 5
京公网安备 11011102002149号