Number Theory- Number Of Divisors

https://hack.codingblocks.com/contests/c/126/815

For above question, I used the logic as dicussed in this article- https://www.geeksforgeeks.org/count-divisors-array-multiplication/ , which worked fine. Is there any better way of doing it as I can’t figure out the reason behind this logic.

Hi Shahsank, do you want a more efficient solution or do you want the logic behind this approach !?

1 Like

Can you please share the logic behind this approach