@@ -0,0 +1,560 @@
+%22%22%22%0ACount the number of prime numbers less than a non-negative number, n%0A%0AMy solution used Sieve of Eratosthenes%0A%0A%22%22%22%0A%0Aclass Solution(object):%0A    def countPrimes(self, n):%0A        %22%22%22%0A        :type n: int%0A        :rtype: int%0A        %22%22%22%0A        if n%3C=2:%0A            return 0%0A        else:%0A            sieve=%5BTrue%5D*n%0A            sieve%5B0%5D=False%0A            sieve%5B1%5D=False%0A            for i in range(2,int(sqrt(n))+1):%0A                if sieve%5Bi%5D:%0A                    for j in range(i*i,n,i):%0A                        sieve%5Bj%5D=False%0A            return sum(sieve)%0A

Create LeetCode-CountPrimes.py