Python one line solution...


  • -2
    K
    def isPowerOfFour(self, num):
        return num in [0b1,0b100,0b10000,0b1000000,0b100000000,0b10000000000,0b1000000000000,0b100000000000000,0b10000000000000000,0b1000000000000000000,0b100000000000000000000,0b10000000000000000000000,0b1000000000000000000000000,0b100000000000000000000000000,0b10000000000000000000000000000,0b1000000000000000000000000000000]

  • 0
    X

    That's cool.


  • 0

    The man who conquers test cases.


  • 0
    Y

    haha. have to down vote tho!


Log in to reply
 

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