import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int n =sc.nextInt();
int x=0,y=n;
while(y!=0) {
x = x*10 + y%10;
y=y/10;
}
System.out.println(x);
}
}
Java实现洛谷P1307 [NOIP2011 普及组] 数字反转
最新推荐文章于 2024-07-07 09:38:48 发布