题解 | #求最大连续bit数#
求最大连续bit数
https://www.nowcoder.com/practice/4b1658fd8ffb4217bc3b7e85a38cfaf2
import sys n = bin(int(input()))[2:].split('0') print(len(sorted(n,key = len)[-1]))
求最大连续bit数
https://www.nowcoder.com/practice/4b1658fd8ffb4217bc3b7e85a38cfaf2
import sys n = bin(int(input()))[2:].split('0') print(len(sorted(n,key = len)[-1]))
相关推荐