Skip to content

Commit 6b96f77

Browse files
sean424WhiteHyun
andauthored
bitwise operation instead of '//'
Co-authored-by: SeungHyun Hong <[email protected]>
1 parent b7c826b commit 6b96f77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

climbing-stairs/bhyun-kim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def climbStairs(self, n: int) -> int:
3333

3434
output = 0
3535

36-
for i in range(n // 2 + 1):
36+
for i in range((n >> 1) + 1):
3737
num_ways = factorials[n - i] // factorials[n - (i * 2)] // factorials[i]
3838
output += num_ways
3939
return int(output)

0 commit comments

Comments
 (0)