CT452

Sara and the Topaz abacus beads

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The harbor bell rings at the forest village of Briarthorn; Sara weighs the day's abacus beads manifests and starts the calculations. Task: Print the number of 1-bits in the binary form of n. Input format: One line with a single integer n. Output format: Print the popcount. Constraints: 0 <= n <= 1000000000000000000.

Example 1:

Input: 215356013628867148
Output: 28

Example 2:

Input: 392928110637899890
Output: 29

Example 3:

Input: 645731170425358786
Output: 25

Constraints:

0 <= n <= 1000000000000000000.

Loading...
Test Cases:No test cases
No test cases available.