You are viewing a single comment's thread. Return to all comments →
In Python 3 this would be:
n = int(input().strip()) numbers = str(bin(n)[2:]).split('0') lenghts = [len(num) for num in numbers] print(max(lenghts))
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 →
In Python 3 this would be: