Everything in Excess!: Difference between revisions

From programming_contest
Jump to navigation Jump to search
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..."
 
(No difference)

Latest revision as of 05:13, 27 August 2016

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))