Skip to content

Commit 0a1a77c

Browse files
authored
Update maximum-trailing-zeros-in-a-cornered-path.py
1 parent 5f3eef9 commit 0a1a77c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Python/maximum-trailing-zeros-in-a-cornered-path.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ def maxTrailingZeros(self, grid):
1313
"""
1414
def factor(x):
1515
cnt = [0]*2
16-
y = x
1716
for i, p in enumerate([2, 5]):
18-
while y and y%p == 0:
19-
y //= p
17+
while x and x%p == 0:
18+
x //= p
2019
cnt[i] += 1
2120
return cnt
2221

0 commit comments

Comments
 (0)