I don’t know what’s wrong in my code.
Prateek loves candy
Hi, sorry forgot to add the link
hello @Lakshita2002
a) u need to print nth prime but u r printing sum of prime upto n which is logically incorrect.
follow this->
use sieve and store all prime numbers upto 10^6 in some array and vector .
and then use that vector to answer each query in O(1)
Ok, I attempted in a hurry, will do it again.