Skip to content

Commit 6fcf1b8

Browse files
committed
pass integer to math.factorial in project_euler/problem_015
1 parent 9121b12 commit 6fcf1b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project_euler/problem_015/sol1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def solution(n: int = 20) -> int:
2626
"""
2727
n = 2 * n # middle entry of odd rows starting at row 3 is the solution for n = 1,
2828
# 2, 3,...
29-
k = n / 2
29+
k = n // 2
3030

3131
return int(factorial(n) / (factorial(k) * factorial(n - k)))
3232

0 commit comments

Comments
 (0)