[SPOJ] DIVSUM2 Showing Time Limit Exceeded

Revision en1, by i_love_emilia_clarke, 2015-10-27 16:11:11

Hi, I am trying to solve this www.spoj.com/problems/DIVSUM2 but getting TLE . I have pre-calculated primes up-to 10**7 and then for each test-cases i factorize it using O(sqrt(n)) method and then run GP formula for each of the prime factor of the given integer. Here is my solution... http://ideone.com/ZcDbYN... Please Help...

Tags factorization, divisors

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English i_love_emilia_clarke 2015-10-27 16:11:11 372 Initial revision (published)