Skip to content

Commit 1063924

Browse files
committed
Provide descriptive name for the parameter: m
1 parent 6f82d11 commit 1063924

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

project_euler/problem_115/sol1.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
from itertools import count
2828

2929

30-
def solution(m: int = 50) -> int:
30+
def solution(min_block_length: int = 50) -> int:
3131
"""
32-
Returns for given m the least value of n
32+
Returns for given minimum block length the least value of n
3333
for which the fill-count function first exceeds one million
3434
3535
>>> solution(3)
@@ -39,12 +39,12 @@ def solution(m: int = 50) -> int:
3939
57
4040
"""
4141

42-
fill_count_functions = [1] * m
42+
fill_count_functions = [1] * min_block_length
4343

44-
for n in count(m):
44+
for n in count(min_block_length):
4545
fill_count_functions.append(1)
4646

47-
for block_length in range(m, n + 1):
47+
for block_length in range(min_block_length, n + 1):
4848
for block_start in range(n - block_length):
4949
fill_count_functions[n] += fill_count_functions[
5050
n - block_start - block_length - 1

0 commit comments

Comments
 (0)