RSS - topcoder

Download Report

Transcript RSS - topcoder

>Problem Link</a><br>I coded up a solution,
and estimated its time complexity as
O(N*sqrt(N) + N*sqrt(N)*17).To see
why:<br>To find out if a number N is prime or
not: O(sqrt(N))<br>To find out how many
numbers from 2 to N are prime:
O(N*sqrt(N))<br>The above is just a rough
upper bound assuming each prime check
takes sqrt(N) time.<br>To find out if a given
number has a prime number of factors in its
prime factorization:<br>We will check the