Magic square by nn

for(n=readline(i=j=0);j||i++<(j=n);)putstr(/...$/.exec('  '+((i+2*--j)%n*n+(i+j+(n>>1))%n+1))+(j?' ':'\n'))

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

download

return to the top page