Skip to content

Commit

Permalink
add euler071 solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kailanefelix committed Oct 6, 2021
1 parent 097c348 commit 63b6616
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions euler0XX/euler071.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
max_fraction, numerator = 0, 0
for d in range(2, 1_000_001):
for n in range(ceil(d * max_fraction), int(3 * d / 7)):
if gcd(n, d) == 1:
max_fraction = n / d
numerator = n
print(numerator)

0 comments on commit 63b6616

Please sign in to comment.