h=[z=0]*d=M=997;1000.times{print h[z=(z+305**d+=t=h[z]^=1)%M];d-=1-t}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page