fork download
  1. L=range(2,input()+1)
  2. while L[0]*2<=L[-1]:L.remove(L[0]*2);L=L[1:]
  3. print L
Success #stdin #stdout 0.01s 9032KB
stdin
22
stdout
[12, 13, 15, 17, 19, 20, 21]