Skip to content

Commit fdf3614

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 30aabe7 commit fdf3614

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

project_euler/problem_073/sol1.py

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from math import gcd
2020

21+
2122
def slow_solution(max_d: int = 12_000) -> int:
2223
"""
2324
Returns number of fractions lie between 1/3 and 1/2 in the sorted set
@@ -40,6 +41,7 @@ def slow_solution(max_d: int = 12_000) -> int:
4041
fractions_number += 1
4142
return fractions_number
4243

44+
4345
def solution(max_d: int = 12_000) -> int:
4446
"""
4547
Returns number of fractions lie between 1/3 and 1/2 in the sorted set
@@ -71,6 +73,7 @@ def solution(max_d: int = 12_000) -> int:
7173
fractions_number += 1
7274
return fractions_number
7375

76+
7477
def benchmark() -> None:
7578
"""
7679
Benchmarks
@@ -86,6 +89,7 @@ def benchmark() -> None:
8689
print(f"slow_solution : {timeit('slow_solution()', globals=globals(), number=10)}")
8790
print(f"solution : {timeit('solution()', globals=globals(), number=10)}")
8891

92+
8993
if __name__ == "__main__":
9094
print(f"{solution() = }")
9195
benchmark()

0 commit comments

Comments
 (0)