fork(1) download
  1. def p(i):
  2. r=[]
  3. d=2
  4. while i:
  5. if all(d%e for e in r):
  6. r+=[d]
  7. i-=1
  8. d+=1
  9. print('\n'.join(str(e)for e in r))
  10.  
  11. p(11)
Success #stdin #stdout 0.01s 9992KB
stdin
Standard input is empty
stdout
2
3
5
7
11
13
17
19
23
29
31