Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = 121
- simple = [True]*(N+1)
- for x in range(2, int(N**0.5) + 1):
- if simple[x]:
- y = x*x
- while y <= N:
- simple[y] = False
- y += x
- for x in range(2, N):
- if simple[x]:
- print(x, end=' ')
- print()
Advertisement
Add Comment
Please, Sign In to add comment