342. Power of Four

class Solution(object):
    def isPowerOfFour(self, num):
        """
        :type num: int
        :rtype: bool
        """
        
        return num>0 and num&num-1==0 and num&int('55555555',16)==num
        

你可能感兴趣的:(342. Power of Four)