Easy
008Number of 1 Bits
Return the number of set bits in the unsigned binary representation of n.
EXAMPLES
Example 1
Input
{
"n": 11
}
Output
3FUNCTION SHAPE
n: int→intReturn the number of set bits in the unsigned binary representation of n.
EXAMPLES
Input
{
"n": 11
}
Output
3FUNCTION SHAPE
n: int→intRuns solve(...) locally in a browser worker. SWE Playbook does not submit your code. Only run code you trust; Python code may access the network.