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