Skip to content

Commit

Permalink
476
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Apr 25, 2022
1 parent b8a00fb commit a12f6f1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions E_476_NumberComplement.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Solution:
def findComplement(self, num: int) -> int:
i=0
j=0
while(i<num):
i+= 2**j
j=j+1
return i-num

0 comments on commit a12f6f1

Please sign in to comment.