Skip to content

Commit c89ecc8

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

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

project_euler/problem_108/sol1.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"""
2626

2727

28-
def find_primes(n : int) -> list[int]:
28+
def find_primes(n: int) -> list[int]:
2929
"""
3030
Returns a list of all primes less than or equal to n
3131
>>> find_primes(19)
@@ -39,7 +39,7 @@ def find_primes(n : int) -> list[int]:
3939
return [i for i in range(2, n + 1) if sieve[i]]
4040

4141

42-
def find_prime_factorizations(n : int) -> list[dict[int, int]]:
42+
def find_prime_factorizations(n: int) -> list[dict[int, int]]:
4343
"""
4444
Returns a list of prime factorizations of 2...n, with prime
4545
factorization represented as a dictionary of (prime, exponent) pairs
@@ -59,7 +59,7 @@ def find_prime_factorizations(n : int) -> list[dict[int, int]]:
5959
return prime_factorizations
6060

6161

62-
def num_divisors_of_square(prime_factorization : dict[int, int]) -> int:
62+
def num_divisors_of_square(prime_factorization: dict[int, int]) -> int:
6363
"""
6464
Returns the number of divisors of n * n, where n is the
6565
number represented by the input prime factorization
@@ -72,7 +72,7 @@ def num_divisors_of_square(prime_factorization : dict[int, int]) -> int:
7272
return num_divisors
7373

7474

75-
def solution(target : int = 1000) -> int:
75+
def solution(target: int = 1000) -> int:
7676
"""
7777
Returns the smallest n with more than 'target' solutions
7878
>>> solution()
@@ -89,5 +89,6 @@ def num_solutions(n):
8989
if num_solutions(i) > target:
9090
return i
9191

92+
9293
if __name__ == "__main__":
9394
print(f"{solution() = }")

0 commit comments

Comments
 (0)