Plz give me its solution

Plz give me its solution.Dont able to understand this

@garganshul151 This question is based on the Sieve of Eratosthenes. If you are not aware of this then please refer its lecture video in the number theory section of your course.
You can refer this code for help:

it is not in number theory section

You can refer this video. Prime Sieve is used here.

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.