data a;
do a=1 to 9 ;
do b= 1 to 9;
do c= 1 to 9;
do d=1 to 9;
do e = 1 to 9;
do f= 1 to 9;
do g =1 to 9;
do h=1 to 9;
do i= 1 to 9 ;
x=(a*100000000+b*10000000+c*1000000+d*100000+e*10000+f*1000+g*100+h*10+i)+864197532;
y=(i*100000000+h*10000000+g*1000000+f*100000+e*10000+d*1000+c*100+b*10+a);
if x=y then do;
output;
stop;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
run;
proc print data=a;run;
结果:
a b c d e f g h i x y
11 1 1 1 3 5 7 9 975311111 975311111