1 条题解
-
0
Java :
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner n = new Scanner(System.in); int a = n.nextInt(); reverse(a); } public static void reverse(int a) { if (a > 0) { while (a != 0) { int z = a % 10; System.out.print(z); a = a / 10; } } else { a = Math.abs(a); System.out.print("-"); while (a != 0) { int z = a % 10; System.out.print(z); a = a / 10; } } } }
- 1
信息
- ID
- 3384
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者