Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime Numbers :-> Sieve of Eratosthenes
#python 3.5.2 from time import time start = time() N = 999999 prime = [True for i in range(N+1)] p = 2 while (p * p <= N): if(prime[p] == True): for i in range(p*p,N+1,p): prime[i] = False p+=1 end = time() print("Total Time : ", end-start) for i in range(2,N+1): if(prime[i] == True): #print(i,end = " ") pass
run
|
edit
|
history
|
help
0
Lakshya chouhan
Exception.py
Lesson3
LinkedList implementation
HW. InsertionSort in Descending order
Add missing person
26.09.2018
15
adda
Pierwiastkowanie