1009. Complement of Base 10 Integer

題目 我的代碼 只要找到補的2*n-1 得到剩下的補。 class Solution(object): def bitwiseComplement(self, N): """ :type N: int :rtype: int """ i=2 while N>=i: i*=2 return i-N-1 優
相關文章
相關標籤/搜索