I dont know why my solution is geting TLE!!!Please have a look http://www.codechef.com/viewsolution/6943810

I am implementing sieve of erasothenes to caclulate primes upto sqrt(10^9) and then applying these primes in the given segment to print all prime no’s…then why it’s giving TLE?? where is my code getting slow and how to correct that…Please help