It is not passing the test case
Prateek Loves Candy problem https://hack.codingblocks.com/app/contests/101/p/52
@sudhanshu8917 You just have to store all prime numbers using Prime Sieve and then print the output accordingly. Brute force way of generating primes will not pass all test case.In case you are not aware of prime sieve, Sieve of Eratosthenes is explained well in a video in the number theory section of your course. Please refer that.
Refer this to check how to implement:
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.