题解 | 求最大连续bit数
n = int(input())
s = str(bin(n))[2:] //去掉前面的'0b'
print(max(map(len, s.split('0'))))
n = int(input())
s = str(bin(n))[2:] //去掉前面的'0b'
print(max(map(len, s.split('0'))))
相关推荐
明天不下雨了:那我建议可以用 chatgpt atlas 或者 dia 去刷,也可以用 chrome 加个 ai 插件去刷