Alwaldend
Docs
Light
Dark
Auto
Docs
Misc
Leetcode submissions
2023-09-21 18:33:03 +0300 MSK
2023-09-21 18:33:03 +0300 MSK
Number Complement
Tags:
Generated
Leetcode_submission
Links
https://leetcode.com/submissions/detail/1055524154/
Code
class
Solution
:
def
findComplement
(self, num: int)
->
int:
return
~
num
+
(
1
<<
num
.
bit_length())