You are viewing a single comment's thread. Return to all comments →
Thank you! I did this in python 2;
import sys n = int(raw_input().strip()) print max([len(x) for x in '{0:b}'.format(n).split('0')])
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 →
Thank you! I did this in python 2;