#231. Power of Two 题目链接 class Solution(object): def isPowerOfTwo(self, n): """ :type n: int :rtype: bool """ if n <=0: return False if n & n -1 == 0: return True return False