由LeetCode 7,9 总结的将数反转的方法
Scanner scanner = new Scanner(System.in);
int input = Integer.parseInt(scanner.next());
int y = input;
int result = 0;
while(input != 0){
result = result*10 + input%10;
input = input/10;
}
Scanner scanner = new Scanner(System.in);
int input = Integer.parseInt(scanner.next());
int y = input;
int result = 0;
while(input != 0){
result = result*10 + input%10;
input = input/10;
}