You are viewing a single comment's thread. Return to all comments →
:) I had same idea. - noticed the count for 1101 is the same as for 1011
n = int(raw_input()) c=0 max=c while n > 0: x=n%2 n=n/2 #print x, if x == 1: c+=1 else: c=0 if c > max: max = c print max
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 →
:) I had same idea. - noticed the count for 1101 is the same as for 1011