integer concatenation by BioFALSE (aut.)

<>;while(<>){@i=@s=();chomp;A(split/ /);sub A{for(0..@_-1){my@a=@_;push@i,splice@a,$_,1;@a?A(@a):push@s,join"",@i;pop@i}}$x="";for(@s){$_-=reverse$_;$x=$_ if$x==""||$_>$x}print"$x\n"}

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

download

return to the top page