https://projecteuler.net/problem=24
Python allows for a remarkably compact solution to this one. First call permutations on a string of the 0-9 digits. Then join them all to a string, which we ultimately map the int function onto. Then we return the millionth element of the sorted list.
from itertools import permutations
def problem24():
vals = list(permutations('0123456789'))
vals = ["".join(x) for x in vals]
vals = list(map(int, vals))
final = sorted(vals)
return final[1000000]
2783915604
Auf dieser Seite können Sie das Online-Video Project Euler 24 Lexicographic Permutations in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Jeffrey James 03 Februar 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,996 Mal angesehen und es wurde von 10 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!