here is the link to the the problem.
here is the link to the solution of the problem
i am passing all the testcases with the above solution but why i am not passing all the testcases when i am using library function to count the no of bits. i am using library function __builtin_popcount().