I am generating primes till sqrt(10**9)
using Sieve of Eratosthenes and then calculating divisors of numbers in the given range by dividing them by primes till sqrt(number)
but it's getting TLE.
UPDATE:I found my mistake. The sieve implementation is wrong.
UPDATE2:I corrected the Sieve but its still getting TLE. I am using the same algorithm as this New solution
https://github.com/venkat2912/data-stuctures-and-algorithms-in-python/blob/master/segmentedSieveto%20check%20%20primes%20for%20very%20high%20ranges
I am too getting a TLE.
Can anyone help me understand what else needs to be optimised