There was an error while loading. Please reload this page.
1 parent daed213 commit af4c6eeCopy full SHA for af4c6ee
LeetCode/0191_Number_of_1_bits.py
@@ -0,0 +1,4 @@
1
+class Solution:
2
+ def hammingWeight(self, n: int) -> int:
3
+
4
+ return '{0:b}'.format(n).count('1')
0 commit comments