美文网首页
342. Power of Four

342. Power of Four

作者: 阿团相信梦想都能实现 | 来源:发表于2016-12-31 11:07 被阅读0次
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

      本文链接:https://www.haomeiwen.com/subject/pdvvvttx.html