File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
project_euler/problem_115 Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 27
27
from itertools import count
28
28
29
29
30
- def solution (m : int = 50 ) -> int :
30
+ def solution (min_block_length : int = 50 ) -> int :
31
31
"""
32
- Returns for given m the least value of n
32
+ Returns for given minimum block length the least value of n
33
33
for which the fill-count function first exceeds one million
34
34
35
35
>>> solution(3)
@@ -39,12 +39,12 @@ def solution(m: int = 50) -> int:
39
39
57
40
40
"""
41
41
42
- fill_count_functions = [1 ] * m
42
+ fill_count_functions = [1 ] * min_block_length
43
43
44
- for n in count (m ):
44
+ for n in count (min_block_length ):
45
45
fill_count_functions .append (1 )
46
46
47
- for block_length in range (m , n + 1 ):
47
+ for block_length in range (min_block_length , n + 1 ):
48
48
for block_start in range (n - block_length ):
49
49
fill_count_functions [n ] += fill_count_functions [
50
50
n - block_start - block_length - 1
You can’t perform that action at this time.
0 commit comments