数字反转

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

【题目描述】

给定一个整数,请将该数各个位上数字反转得到一个新数。新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零,例如输入-380,反转后得到的新数为-83。

【输入】

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

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

【输出】

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

样例

123
321
-380
-83

【来源】

一本通在线评测


20251012编程挑战精英赛训练

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
51
Start at
2025-9-24 15:00
End at
2025-11-5 7:00
Duration
1000 hour(s)
Host
Partic.
58