Everything in Excess!

From programming_contest
Revision as of 05:13, 27 August 2016 by imported>Kmk21 (Created page with "Factor all the numbers in the range using the linear time algorithm. For each number in the range, walk through the factors and calculate the excess. Runtime: Factoring all n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Factor all the numbers in the range using the linear time algorithm. For each number in the range, walk through the factors and calculate the excess.

Runtime: Factoring all numbers O(n), calculating excess for a given number having pre-computed the factors O(log(n))