-->
当前位置:首页 > 题库

PROGRAMMING:Counts the total number of digits 1 in the binary expansion of nonnegative integers

Luz5年前 (2021-05-10)题库446
Counts the total number of digits 1 in the binary expansion of nonnegative integers. For example, the binary expansion of integer 64 is 00000000 00000000 00100000, and the total number of digits 1 is 1.
###Input format:
Enter an integer n to ensure that n is not greater than the 18th power of 10.
###Output format:
Output the total number of digits 1 in the binary expansion of the integer.
###Input example:
Here is a set of inputs. For example:
```in
four hundred and forty-one
```
###Output example:
The corresponding output is given here. For example:
```out
six
```







answer:If there is no answer, please comment