Tap here to switch tabs
Problem
Submissions

Problem: Convert to Base -2

Convert to Base -2 asks you to represent a nonnegative integer as a binary string whose place values are powers of negative two, rather than the usual positive base.

Statement

Given an integer n, return a binary string representing its value in base −2-2.

Constraints:

  • 0≤n≤1090 \le n \le 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Convert to Base -2

Convert to Base -2 asks you to represent a nonnegative integer as a binary string whose place values are powers of negative two, rather than the usual positive base.

Statement

Given an integer n, return a binary string representing its value in base −2-2.

Constraints:

  • 0≤n≤1090 \le n \le 10^9