class Solution:

    def findComplement(self, num: int) ->int:
        bin_string = bin(num)[2:]
        ch = ['0', 'b']
        for c in bin_string:
            if c == '0':
                ch.append('1')
            else:
                ch.append('0')
        return int(''.join(ch), 2)

0a3443baec4070da460944f51bbcf06d175e6434
<mask token>

class Solution:
    <mask token>

class Solution:

    def findComplement(self, num: int) ->int:
        bin_string = bin(num)[2:]
        ch = ['0', 'b']
        for c in bin_string:
            if c == '0':
                ch.append('1')
            else:
                ch.append('0')
        return int(''.join(ch), 2)
