Zigzag by rst76

main=interact f
f[a,_,c]=unlines[[[c,' ']!!min(mod x m*mod(x+2*y)m)1|x<-[-y..m*n]]|let n=read[a]-1;m=2*n,y<-[0..n]]

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

download

return to the top page