C++ 5 line beat 100%
\nclass Solution {\npublic:\n    string baseNeg2(int N) {\n        string s = "";\n        while(N) {\n            int a = abs(N%(-2));\n            s = (a == 0
```\nclass Solution {\npublic:\n    string baseNeg2(int N) {\n        string s = "";\n        while(N) {\n            int a = abs(N%(-2));\n            s = (a == 0 ? \'0\' : \'1\') + s;\n            N = (N-a)/(-2);\n        }\n        return s == "" ? "0" : s;   \n    }\n};\n```
[]