除-2取余法，余数必须为正
\npython\nclass Solution:\n    def baseNeg2(self, N: int) -> str:\n        if not N:\n            return "0"\n        ret = []\n        while N:\n            r 
\n```python\nclass Solution:\n    def baseNeg2(self, N: int) -> str:\n        if not N:\n            return "0"\n        ret = []\n        while N:\n            r = N % (-2)\n            N //= (-2)\n            if r < 0:\n                r = 2 + r\n                N += 1\n            ret.append(str(r))\n        ret.reverse()\n        return "".join(ret)\n```
[]