Easy Python Solution using bin


#1

def solve(self, A):
b=bin(A)
b1=""
for i in range(2,len(b)):
b1=b1+b[i]
count=0
for i in b1:
if i!=“0”:
count=0
continue
else:
count+=1
return count