```csharp
import time
def Count_Prime(n):
output=[1]*n #初始值认为0至n-1都为质数
output[0],output[1]=0,0 #0和1都不为质数
for i in range(2,int(n**0.5)+1):#遍历2-
output[i*i:n:i]=[0]*len(output[i*i:n:i])
print(output)
print(output)
return sum(output)
if __name__=='__main__':
start_time=time.time()
print(Count_Prime(20000))
end_time=time.time()
print(end_time-start_time)