Adopted new convention from template
This commit is contained in:
parent
787c771162
commit
5f36185d59
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Created on 09 Oct 2021
|
||||
|
||||
@ -10,6 +10,7 @@ https://projecteuler.net/problem=57
|
||||
"""
|
||||
|
||||
from fractions import Fraction
|
||||
|
||||
from utils import timeit
|
||||
|
||||
|
||||
@ -36,7 +37,7 @@ def compute():
|
||||
|
||||
ans = 0
|
||||
f = Fraction(1, 2)
|
||||
for i in range(1000):
|
||||
for _ in range(1000):
|
||||
f = 1 / (2 + f)
|
||||
result = 1 + f
|
||||
if len(str(result.numerator)) > len(str(result.denominator)):
|
||||
@ -46,5 +47,4 @@ def compute():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print(f"Result for Problem 57: {compute()}")
|
||||
print(f"Result for Problem 57 is {compute()}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user