value in binary with no leading zeros, then turn every 1 in that string into a 0 and every 0 into a 1.
Return the resulting number.value=12 → 3
12 is 1100. Inverted, it becomes 0011, which is 3.
value=7 → 0
7 is 111; every bit turns into 0, so the answer is 0.
value=18 → 13
18 is 10010 → 01101, which is 13.
value=12
3
Run checks the first 3 tests in your browser. Submit checks all 45 tests on the server, hidden ones included.