partition by parity by yamaya

t=table
f=function(r)for i=1,#t do _=t[i]%2~=r or print(t[i])end end
for n in io.lines()do t[#t+1]=n+0 end
t:sort()f(0)print()f(1)

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

download

return to the top page