归档 2015年4月27日

[LeetCode]Count Primes

题目描述:

Count the number of prime numbers less than a non-negative number, n

Hint: The number n could be in the order of 100,000 to 5,000,000.

References:

How Many Primes Are There? (https://primes.utm.edu/howmany.html)

Sieve of Eratosthenes (http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)

题目大意:

统计小于非负整数n的素数的个数

提示:n的范围是100,000到5,000,000 ...

继续阅读

昨天

明天

归档