Adopted new convention from template
This commit is contained in:
parent
14b665ed5a
commit
a0775260db
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
Created on 13 Oct 2021
|
Created on 13 Oct 2021
|
||||||
|
|
||||||
@ -11,6 +11,7 @@ https://projecteuler.net/problem=59
|
|||||||
|
|
||||||
from itertools import permutations
|
from itertools import permutations
|
||||||
from string import ascii_lowercase
|
from string import ascii_lowercase
|
||||||
|
|
||||||
from utils import timeit
|
from utils import timeit
|
||||||
|
|
||||||
|
|
||||||
@ -46,10 +47,8 @@ def compute():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
with open("../files/Problem59.txt", "r") as f:
|
with open("../files/Problem59.txt", "r") as f:
|
||||||
# encrypted = list(map(int, f.read().split(',')))
|
|
||||||
encrypted = [int(char) for char in f.read().split(",")]
|
encrypted = [int(char) for char in f.read().split(",")]
|
||||||
# print(encrypted)
|
|
||||||
# print(test)
|
|
||||||
plain_text = len(encrypted) // 3
|
plain_text = len(encrypted) // 3
|
||||||
for key in permutations(ascii_lowercase, 3):
|
for key in permutations(ascii_lowercase, 3):
|
||||||
decrypted = ""
|
decrypted = ""
|
||||||
@ -62,5 +61,4 @@ def compute():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
print(f"Result for Problem 59 is {compute()}")
|
||||||
print(f"Result for Problem 59: {compute()}")
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user