题解 | #求最大连续bit数#
求最大连续bit数
https://www.nowcoder.com/practice/4b1658fd8ffb4217bc3b7e85a38cfaf2
ipt = int(input())
res = [len(i) for i in str(bin(ipt))[2:].split("0")]
print(max(res))
求最大连续bit数
https://www.nowcoder.com/practice/4b1658fd8ffb4217bc3b7e85a38cfaf2
ipt = int(input())
res = [len(i) for i in str(bin(ipt))[2:].split("0")]
print(max(res))
相关推荐
那场寒冬:字节入职后完全看组有没有hc,暑假实习只是一个名字