Magic square by Defenestrator

n=y=input()
while y:print' '.join('%3i'%((~y-x*2)%n*n+(~y-x-n/2)%n+1)for x in range(n));y-=1

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

download

return to the top page