Prime visits problem

no output, what changes need to be made?

@vipin.kumar
Share your code using cb.lk/ide so I can have a look.

@vipin.kumar
You have not taken input for n.
Even still this your code will give TLE as this problem requires you to use Sieve to precompute primes. The Sieve technique has been discussed in detail in the Number Theory section of your course. Kindly refer to it.

1 Like