1570: 1.5-29:数字反转

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:736 Solved:371

Description

给定一个整数,请将该数各个位上数字反转得到一个新数。新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零(参见样例2)。

Input

输入共 1 行,一个整数N。

-1,000,000,000 ≤ N≤ 1,000,000,000。

Output

输出共 1 行,一个整数,表示反转后的新数。

Sample Input Copy

样例 #1:
123

样例 #2:
-380

Sample Output Copy

样例 #1:
321

样例 #2:
-83

加入题单

算法标签: