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 优
相关文章
相关标签/搜索