Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- _t1 = time.time()
- max = 10000000
- prime = [False, False]
- for x in xrange(2, max):
- prime.append(True)
- for x in xrange(0, max):
- if(prime[x]):
- for i in xrange(2, max / x):
- prime[x * i] = False;
- _t2 = time.time() - _t1
- print 'It took %s ms'%_t2
- raw_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement