Adopted new convention from template
This commit is contained in:
parent
9934dd3d38
commit
0d15cfab5d
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Created on 03 Aug 2021
|
||||
|
||||
@ -10,6 +10,7 @@ https://projecteuler.net/problem=43
|
||||
"""
|
||||
|
||||
from itertools import permutations
|
||||
|
||||
from utils import timeit
|
||||
|
||||
|
||||
@ -34,7 +35,7 @@ def compute():
|
||||
Find the sum of all 0 to 9 pandigital numbers with this property.
|
||||
"""
|
||||
ans = []
|
||||
pandigital = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
|
||||
pandigital = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
||||
|
||||
for n in permutations(pandigital):
|
||||
n_ = "".join(n)
|
||||
@ -50,6 +51,6 @@ def compute():
|
||||
|
||||
return sum(ans)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print(f"Result for Problem 43: {compute()}")
|
||||
if __name__ == "__main__":
|
||||
print(f"Result for Problem 43 is {compute()}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user