We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7c826b commit 6b96f77Copy full SHA for 6b96f77
climbing-stairs/bhyun-kim.py
@@ -33,7 +33,7 @@ def climbStairs(self, n: int) -> int:
33
34
output = 0
35
36
- for i in range(n // 2 + 1):
+ for i in range((n >> 1) + 1):
37
num_ways = factorials[n - i] // factorials[n - (i * 2)] // factorials[i]
38
output += num_ways
39
return int(output)
0 commit comments