TLE Error in the problem Deepak and Primes

I tried solving the problem Deepak and Primes using the Sieve approach but it gives an time limit error. I can’t identify any bug in my code, please help.

Here is my code: https://ide.codingblocks.com/s/297668

hello @Yash5646

image
use long long here.
also check value of 500 000 th prime number and declar ur sieve size greater than that

where exactly am I supposed to use long long ?? for the the first loop, I want i*i < 10000 0000 which means i will go till 10000 which is in the range of int

first i*i will be computed and then comparision will happen.

so i*i may exceed the range of int.

I made int i to long long long int i, but I am still getting TLE.

… .
dont run for 100000001
instead

and run ur all loops upto that number only