main=interact$unlines.scanl1(%).lines p%q=take(max(l p*2)$l q*2-1)$(p++p)#cycle q l=length x#(y:z)=y:z#x
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page