You are viewing a single comment's thread. Return to all comments →
Simple python3 solution for this using itertools groupby:
print(max([len(list(g)) for k, g in groupby(bin(n))]))
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 →
Simple python3 solution for this using itertools groupby: