S=sorted h=k=100 while k<1e6: k+=1;P=`k%h`;P+=P[~len(`k`)|6::-1] if S(P)==S(`k/h`):print P;k+=-k%h
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page