Ghost leg solver by Lost_dog

main=interact$unlines.f.lines
f s=s++[foldl1(#)s]
(x:y:z)#(s:t:u)|t>y=a:y:x:b|1>0=x:y:a:b where a:b=z#u
x#_=x

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

download

return to the top page