My python seive of eratosthanese


#1

class Solution:
# @param A : integer
# @return a list of integers
def sieve(self, a):
primes=[True](a+1)
for i in range(2,int(math.sqrt(a))+1):
if primes[i]==True:
for j in range(i
i,a+1,i):
primes[j]=False
b=[]
for i in range(2,a+1):
if primes[i]==True:
b.append(i)
return b