gautam94's blog

By gautam94, 10 years ago, In English

Problem link

My solution

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

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
11 days ago, # |
  Vote: I like it 0 Vote: I do not like it