def sum5(k):
sum = 0
while k > 0:
sum += (k % 5)
k //= 5
return sum
n = int(input())
print(sum5(n))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
def sum5(k):
sum = 0
while k > 0:
sum += (k % 5)
k //= 5
return sum
n = int(input())
print(sum5(n))