Deepak and primes compiles successfully but no output printed

Hello @hrishikeshjanjal,

Your code was causing TLE.
I have modified it:


Please, refer to the comments.

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