You are viewing a single comment's thread. Return to all comments →
python3:
n = int(input().strip()) s=str(bin(n)) count=0 max1=[] for i in s: if i=='1': count+=1 max1.append(count) else: count=0 print(max(max1))
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 →
python3: