n=0 while n<1e4:n+=1;s="".join(sorted(str(n)));r=s[::s>"1"!=n>9!=s[0]==s[1]or-1];p=r[1:]+r[0];p==p[::-1]!=print(p)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page