Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in 3rd party category for End Zeros by baranikov
import numpy as np
def end_zeros(b):
if b==0:
return 1
for i in np.arange(1,len(str(b))+1):
if float(b/(10**i)).is_integer()==False:
break
return i-1
print(end_zeros(0))
assert end_zeros(0) == 1
assert end_zeros(1) == 0
assert end_zeros(10) == 1
assert end_zeros(101) == 0
assert end_zeros(245) == 0
assert end_zeros(100100) == 2
print("Coding complete? Click 'Check' to earn cool rewards!")
May 16, 2020
Comments: