Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass integer to math.factorial in project_euler/problem_015
  • Loading branch information
poyea committed Oct 21, 2021
commit 6fcf1b80d66f968dcda82fc36c0c875b0a7cbf62
2 changes: 1 addition & 1 deletion project_euler/problem_015/sol1.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def solution(n: int = 20) -> int:
"""
n = 2 * n # middle entry of odd rows starting at row 3 is the solution for n = 1,
# 2, 3,...
k = n / 2
k = n // 2

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

Expand Down