N Queens by nn

function q(n,a,p,i){if(n<$1)for(i=0;i<$1;i++)index(a,i)+index(p,s=10+i+n)+index(p,t=40+i-n)||q(n+1,n?a" "i:i,p" "s" "t)
else
print a}q()

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

download

return top