Recursive Expansion by mitchs (alt)

N=4<<input()
print'','_'*~-N
for I in range(N/4):f=lambda j,i=I,n=N/8:n and(j/n*n*n+f(i,j%n,n/2),(1+i/n)*n*n+f(j-n,i%n,n/2))[0<j/n<3]+i/n/2;print'|'+''.join(' _'[f(j)<f(j,I+1)]+'_|'[f(j)<f(j+1)]for j in range(N/2))

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

download

return to the top page