Return how many bits of n are 1 when n is written in binary. For n = 13 (binary 1101) the answer is 3.
Example 1
Input:
count_set_bits(13)
Output:
3
Example 2
Input:
count_set_bits(0)
Output:
0
0 <= n < 2**62No results yet
Run your code to check it against the examples, or submit to run every test.