challenges

Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.

This project is maintained by chankruze

Number of Ones

Task

Count the number of ones in the binary representation of a given integer.

Input Format

An integer.

Output Format

An integer representing the count of ones in the binary representation of the input.

Sample Input

9

Sample Output

2

Explanation

The binary representation of 9 is 1001, which includes 2 ones.

Solutions

Language Solution
C not available
CPP not available
C# not available
Python available
Java not available
Ruby not available
Swift not available