Skip to content

Commit 7e9ec4d

Browse files
author
joseguilhermefmoura
committed
💡 Add End Zeros
1 parent 686408a commit 7e9ec4d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

1_Elementary/6.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def end_zeros(num: int) -> int:
2+
3+
sum = 0
4+
5+
for number in list(reversed(str(num))):
6+
if int(number) == 0:
7+
sum += 1
8+
else:
9+
return sum
10+
return sum

0 commit comments

Comments
 (0)