Can you explain about this ambiguous o/p by inbuilt function

Sample Input: 4294967296
O/P:
1
1
0
Why __builtin_popcount(n) does not give the ans as 1

@babayaga refer to the first comment https://codeforces.com/blog/entry/13134

1 Like

Well, Thank You for the help, marking the doubt as resolved
Also, Can you help me with : DEEPAK AND PRIMES
Here, is my code

hi @babayaga please raise a separate doubt for that question under the relevant section in the course so that we can assist you better

I raised the doubt on 1 September, It is still not clear
One of the TA replied, but She mixed Deepak and Primes WITH Deepak and Primes II
And, I pointed out this to her and asked for help, but I haven’t got any reply from her side
That’s why I asked you @Ishitagambhir

Hi @babayaga you can re-open that doubt so that some other TA can take over! Meanwhile please send the description of the problem so I can help you further

Deepak is learning Sieve of Eratosthenes, He is stuck somewhere. Help him printing prime numbers.

Input Format
Single line containing integral value n.

Constraints
1<=n<=500000

Output Format
Integral value denoting nth prime number.

Sample Input
1
Sample Output
2

@babayaga size of your sieve is not sufficient. Google what is the 500000th prime number, the sieve should be big enough to accommodate that number

1 Like

Well, Thank you so much for the help, It worked
Big thanks @Ishitagambhir

@babayaga don’t forget to mark this doubt as resolved. Happy coding!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.