Efficent solution(1.0 sec.) for counting divisiors

Revision en2, by TARS, 2020-09-25 11:51:29

I've tried to solve this using sieve and prime factorization but I got TLE for some cases. Here is the CSES problem:) (https://cses.fi/problemset/task/1713/)

Here is my solution

I need a more efficient approach.

Tags #divisors, #sieve, #countingdivisors, #prime

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English TARS 2020-09-25 12:09:05 7 Tiny change: 'deone.com/)\n \nI ne' -> 'deone.com/EiLUs2))\n \nI ne'
en2 English TARS 2020-09-25 11:51:29 3
en1 English TARS 2020-09-25 11:50:34 297 Initial revision (published)