Python Simple Solution Faster Than 97.39%
\nclass Solution:\n    def findComplement(self, num: int) -> int:\n        s=bin(num).replace(\'0b\',\'\')\n        t=\'\'\n        for i in s:\n            if 
```\nclass Solution:\n    def findComplement(self, num: int) -> int:\n        s=bin(num).replace(\'0b\',\'\')\n        t=\'\'\n        for i in s:\n            if i==\'0\':\n                t+=\'1\'\n            else:\n                t+=\'0\'\n        return int(t,2)\n```
['Python']