bitmask count set bits 2
Total number of factors of n
Total number of divisors of n
Total number of unset bits in binary representation of a n
Total number of set bits in binary representation of a n
bitmask count set bits 2
Total number of factors of n
Total number of divisors of n
Total number of unset bits in binary representation of a n
Total number of set bits in binary representation of a n
bool get (int n)
{
int x = 0;
while( n )
{
x += n&1;
n = n>>1;
}
return x;
}
Above function will return :-
this is complete question and ans is