Adopted new convention from template
This commit is contained in:
parent
1427c84dd9
commit
3c0993b179
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Created on 04 Mar 2021
|
||||
|
||||
@ -13,7 +13,6 @@ from utils import timeit
|
||||
|
||||
|
||||
@timeit("Problem 33")
|
||||
|
||||
def compute():
|
||||
"""
|
||||
The fraction 49/98 is a curious fraction, as an inexperienced mathematician
|
||||
@ -23,11 +22,13 @@ def compute():
|
||||
We shall consider fractions like, 30/50 = 3/5, to be trivial examples.
|
||||
|
||||
There are exactly four non-trivial examples of this type of fraction, less
|
||||
than one in value, and containing two digits in the numerator and denominator.
|
||||
than one in value, and containing two digits in the numerator and
|
||||
denominator.
|
||||
|
||||
If the product of these four fractions is given in its lowest common terms,
|
||||
find the value of the denominator.
|
||||
"""
|
||||
|
||||
numerator = 1
|
||||
denominator = 1
|
||||
for x in range(10, 100):
|
||||
@ -39,9 +40,8 @@ def compute():
|
||||
numerator *= x
|
||||
denominator *= y
|
||||
|
||||
return int(denominator/numerator)
|
||||
return int(denominator / numerator)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print(f"Result for Problem 33: {compute()}")
|
||||
print(f"Result for Problem 33 is {compute()}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user