from itertools import permutations as p for i in range(1,10**4): k=[int("".join(j))for j in p(str(i))if int(j[0])and j==j[::-1]] if k:print(min(k))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page