You are viewing a single comment's thread. Return to all comments →
here is the simplest code in python:-
n = int(input().strip()) c=bin(n) h=0 d=[] for i in str(c)[2:]: if(int(i)==0): h=0 else: h+=1 d.append(h) #print(d) print(max(d))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 10: Binary Numbers
You are viewing a single comment's thread. Return to all comments →
here is the simplest code in python:-