diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -5,14 +5,15 @@
 import bisect
 import itertools
 import functools
+
+
 class Solution:
     def findComplement(self, num: int) -> int:
-        com = ''
-        while num > 0 :
-            
-            if num % 2 = 1:
-                com += 0
+        com = ""
+        while num > 0:
+            if num % 2 == 1:
+                com += "0"
             else:
-                com += 1
+                com += "1"
             num = num // 2
-        return int(com,2)
+        return int(com[::-1], 2)
