#luogsj0056. 【深基4.习3】[NOIP2011 普及组] 数字反转

【深基4.习3】[NOIP2011 普及组] 数字反转

Title Description

Given an integer NN , please invert the digits of each digit to obtain a new number. The new number should also satisfy the common form of integers, that is, unless the given original number is zero, the highest digit of the inverted new number should not be zero (see Example 2).

Input format

An integer NN .

Output format

An integer representing the new number after inversion.

123
321
-380
-83

Reminder

[Data Range]

1,000,000,000N1,000,000,000-1,000,000,000\leq N\leq 1,000,000,000

NOIP2011 Popularization Group 1st Question