vaibhav.verrma's blog

By vaibhav.verrma, history, 4 years ago, In English

https://codeforces.net/contest/236/problem/B

Can someone explain why I am getting TLE in the following solution? https://codeforces.net/contest/236/submission/86035444

I have pre-calculated the number of factors of all the numbers up to 1000000, and then looped through each a,b,c and added the number of factors of each i*j*k to the answer. I tried multiple test-cases and they all are giving me the correct answer almost immediately. What is the problem here?

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it