Deepak and prime doubt

my answer is giving wrong for input more than 1000000
please check my code , where i am doing mistake

I have edited your code, try to submit now,

Got it .
thank you !