We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
math.factorial
project_euler/problem_015
1 parent 9121b12 commit 6fcf1b8Copy full SHA for 6fcf1b8
project_euler/problem_015/sol1.py
@@ -26,7 +26,7 @@ def solution(n: int = 20) -> int:
26
"""
27
n = 2 * n # middle entry of odd rows starting at row 3 is the solution for n = 1,
28
# 2, 3,...
29
- k = n / 2
+ k = n // 2
30
31
return int(factorial(n) / (factorial(k) * factorial(n - k)))
32
0 commit comments