Deepak and Primes ll

some testcases are giving me wrong answer . please tell me the problem in my code
here is my code

@RAHUL
looking into it

@RAHUL
Hello rahul,
a)In line no 50 .i.e a%p u should take care that a!=p
b) handle case when a=1

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.