1107: 回文数猜想(函数专题)
import java.util.Scanner;
public class Main {
public static int reverse(int n){
int res=0;while(n>0){
res=res*10+n%10;n=n/10;}return res;}public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int n=cin.nextInt();while(true){
int m=reverse(n);if(m==n){
System.out.printf("%d ",n);break;}else{
System.out.printf("%d ",n);n+=m;}}}
}