I am trying to estimate the upper bound of the time-complexity of this solution by ksun48. Currently, I am assuming the upper bound on the number of divisors of N to be based on this codeforces blog, but that fact doesn't simplify the calculation of time complexity here.
- Is there a simple way to estimate a good upper bound for this solution?
- Is there some literature around formally calculating time complexity in such scenarios?