code: https://ide.codingblocks.com/s/453366
problem: https://codeforces.com/problemset/problem/26/A?f0a28=1
not getting any output
code: https://ide.codingblocks.com/s/453366
problem: https://codeforces.com/problemset/problem/26/A?f0a28=1
not getting any output
hello @raghav007
a) ur frequency array is of 0 size, change it and make it p.size() and intilaide it with 0
b) use long long while computing sieve.
inside inner loop it should be j <p.size()
I have made the changes please check
check n0w->
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.