腾讯精选43--python

mac2022-06-30  115

class Solution(object): def isPowerOfTwo(self, n): """ :type n: int :rtype: bool """ return n>0 and n&(n-1)==0

这个位运算还是挺有意思的 你品 你细品

最新回复(0)