Adopted new convention from template
This commit is contained in:
parent
af245d7946
commit
b0b380bdd8
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Created on 11 Sep 2019
|
||||
|
||||
@ -10,6 +10,7 @@ https://projecteuler.net/problem=24
|
||||
"""
|
||||
|
||||
from itertools import permutations
|
||||
|
||||
from utils import timeit
|
||||
|
||||
|
||||
@ -26,11 +27,12 @@ def compute():
|
||||
What is the millionth lexicographic permutation of the digits
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
|
||||
"""
|
||||
|
||||
digits = list(range(10))
|
||||
_permutations = list(permutations(digits))
|
||||
return "".join(str(digit) for digit in _permutations[999999])
|
||||
|
||||
return "".join(str(digit) for digit in _permutations[999_999])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print(f"Result for Problem 24: {compute()}")
|
||||
print(f"Result for Problem 24 is {compute()}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user