l=range(1,int(raw_input())+1,2);x=3;i=2 while x<=len(l): y=x while y<=len(l):l.pop(y-1);y+=x-1 x=l[i];i+=1 for n in l: print n

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page