231.2的幂
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
if n <= 0 : return False
return n & (n-1) == 0最后更新于
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
if n <= 0 : return False
return n & (n-1) == 0最后更新于