Tower of Hanoi by nn

+function h(n,a,b,c){n--&&h(n,a,c,b)+h(n,b,a,c,o+=a,p+=c)}(readline(o=p=''),'A','B','C')
print(o+'\n'+p)

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

download

return to the top page