You are viewing a single comment's thread. Return to all comments →
import math import os import random import re import sys if __name__ == '__main__': n = int(input().strip()) x=bin(n) d=x[2::] counter=0 res=[] for i in d: if i == '1': counter+=1 res.append(counter) else:counter=0 print(max(res))
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 →