📅  最后修改于: 2022-03-11 14:55:31.998000             🧑  作者: Mango
代码示例1
def findComplement(self, num: int) -> int:
rst = shift = 0
while num:
rst = ((num&1)^1) << shift | rst
num >>= 1
shift += 1
return rst