one line python code


  • 0
    C

    '''
    class Solution(object):

     def isPowerOfFour(self, num):
    
         return num > 0 and bin(num).count('0') % 2 == 1 and bin(num).count('1') == 1
    

    '''


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.