<reponame>kefirzhang/algorithms<gh_stars>0
# 负数 未解决
class Solution:
    def getSum(self, a: int, b: int) -> int:
        while b != 0:
            print(a,b)
            tmp = a ^ b
            b = (a & b) << 1
            a = tmp
        return a


slu = Solution()
print(slu.getSum(-1, 1))

# 负数 未解决
class Solution:
    def getSum(self, a: int, b: int) -> int:
        while b != 0:
            print(a,b)
            tmp = a ^ b
            b = (a & b) << 1
            a = tmp
        return a


slu = Solution()
print(slu.getSum(-1, 1))