def isPowerOfFour(self, num):
        """
        :type num: int
        :rtype: bool
        """
        return num > 0 and (num & (num - 1)) == 0 and \
               ((num & 0b01010101010101010101010101010101) == num)


# Time:  O(1)
# Space: O(1)
dataset/ETHPy150Open kamyu104/LeetCode/Python/power-of-four.py/Solution.isPowerOfFour/original