#!perl -l
$_=1;for($b=pop;$b;){/(.{0,6}?)0*$/;$_=$1*$b--}print/(.$)/
|
Only 14 strokes from the current high score. I wish I could get postorder this short.
#!perl -l
$_=1;for($b=pop;$b;){/(.{0,6}?)0*$/;$_=$1*$b--}/.$/;print$&
|
New approach. A while loop instead of recursion.
#!perl -l
$a=1;$b=pop;while($b){$a*=$b--;$a=~/(.{0,6}?)0*$/;$a=$1}$a=~/.$/;print$&
|
#!perl -l
sub f{return 1if!(my$a=pop);($a*f($a-1))=~/(.{0,6}?)0*$/;return$1}f(pop)=~/.$/;print$&
|
#!perl -l
sub f{my$a=pop;return 1if(!$a);($a*f($a-1))=~/(.{0,6}?)0*$/;return$1;}f(pop)=~/.$/;print$&;
|