#判断一个数是否是2的次方
class Solution(object):
    def isPowerOfTwo(self, n):
        if n==0:    return False
        while n & 1==0:
            n = n>>1
        return n==1

s = Solution()
print(s.isPowerOfTwo(0))

875780ab252170ffa8df9e7a09f94b3dab6f32db
class Solution(object):
    <mask token>


<mask token>

class Solution(object):

    def isPowerOfTwo(self, n):
        if n == 0:
            return False
        while n & 1 == 0:
            n = n >> 1
        return n == 1


<mask token>

class Solution(object):

    def isPowerOfTwo(self, n):
        if n == 0:
            return False
        while n & 1 == 0:
            n = n >> 1
        return n == 1


<mask token>
print(s.isPowerOfTwo(0))

class Solution(object):

    def isPowerOfTwo(self, n):
        if n == 0:
            return False
        while n & 1 == 0:
            n = n >> 1
        return n == 1


s = Solution()
print(s.isPowerOfTwo(0))

#判断一个数是否是2的次方
class Solution(object):
    def isPowerOfTwo(self, n):
        if n==0:    return False
        while n & 1==0:
            n = n>>1
        return n==1

s = Solution()
print(s.isPowerOfTwo(0))
