题解 | #求最大连续bit数#
求最大连续bit数
https://www.nowcoder.com/practice/4b1658fd8ffb4217bc3b7e85a38cfaf2
while True: try: s=bin(int(input()))[::-1] # print(s) count=[] tmp=0 for a in s: if a=='1': tmp+=1 else: count.append(tmp) tmp=0 print(max(count)) except: break