class Solution:

    def findComplement(self, num: int) ->int:
        str = bin(num)[2:]
        str = str.replace('0', 'temp').replace('1', '0').replace('temp', '1')
        return int(str, 2)

d86325adbc8ed9ca9d5fa42b8a4e321884c74a67
<mask token>

class Solution:
    <mask token>

class Solution:

    def findComplement(self, num: int) ->int:
        str = bin(num)[2:]
        str = str.replace('0', 'temp').replace('1', '0').replace('temp', '1')
        return int(str, 2)
