Deepak and primes


how to solve the range problem?? this shows run time error?
i have even used sieve approach? what is to be done

Hello @Vibhuti0206,

  1. Modify the codition:
    for(int i=3;i*i<=n;i+=2)

  2. Make the rage 100000007
    I have selected this by hit and trial method. You would be given the range at the time of competitions. So, don’t worry about that.

Hope, this would help.
Give a like, if you are satisfied.