#!perl -lp040
$@+=y/ma-d/6392/?$@%1e3*/\d/*(9x$&):/.{5}e/.'‡ÐÑøòÂÎârÞå'=~pack(H2,$_)*$+[0].e./y/}{$_=$@;s/\B(?=(...)+$)/,/g
|
I'm trying upload because last time the score was wrong (possible copy/paste problem). This one should be 118.33
#!perl -lp040
$@+=y/bmd/63/?$@%1e3*(9x($_+2+/o/)):/lv|ee./.'‡ÐÑøòÂÎârÞå'=~pack(H2,$_)*$+[0].$-x/y/}{$_=$@;s/\B(?=(...)+$)/,/g
|
The string in the index() is ">\207\320\321\370\362\302\316\342r\336\345"
#!perl -lp040
$@+=/hu|..o\B/g?$@%1e3*(9x(/b/?9:pos)):/lv|ee./.index('>~GÐÑøòÂÎârÞå',pack+H2,$_).$-x/y/}{$_=$@;s/\B(?=(...)+$)/,/g
|
getting tight at the top
#!perl -lp040
$@+=/d|io/?$@%1e3*(9x(3*(3&1+ord)-/r/)):/lv|ee./.ondgdhfoficiceeinideel=~(oo&$_)/2*$+[0].$-x/y/}{$_=$@;s/\B(?=(...)+$)/,/g
|
WARNING: this solution passes the v2 test suite, but fails for "three hundred three" => "303". Also, the test program input does not match the given regex, *no* "\n" is provided. Also, the rules page statement of the tiebreak is backwards, the tiebreak favours programs with *fewer* alphanumerics and spaces.
#!perl -lp040
@={ontwthfofisiseeiniteel=~/../g}=1..$=;!/a|io/?$@+=/lv|ee./.@={/^../g}.$-x/y/+/h/*99*$@:($~+=$@.$-x(3&1+ord)x3,$@=0)}{$_=$~+$@;s/\B(?=(...)+$)/,/g
|
#!perl -lp040
@={ontwthfofisiseeiniteel=~/../g}=1..$=;!/a|io/?$@+=/lv|ee./.@={/^../g}.$-x/y/+/d/*99*$@:($~+=$@.$-x(3&1+ord)x3,$@=0)}{$_=$~+$@;s/\B(?=(...)+$)/,/g
|
Just a plain simple straightforward solution.
#!perl -lp040
@={ontwthfofisiseeiniteel=~/../g}=1..$=;/^h/?$@*=100:!/a|io/?$@+=/lv|ee./.@={/^../g}.$-x/y/:($~+=$@*1e3**(3&1+ord),$@=0)}{$_=$@+$~;s/\B(?=(...)+$)/,/g
|
#!perl -lp040
@={ontwthfofisiseeiniteel=~/../g}=1..$=;/^h/?$@*=100:!/a|io/?$@+=/ee./.@={/^../g}.$-x/y/+/lv/*10:($~+=$@*1e3**(3&1+ord),$@=0)}{$_=$@+$~;s/\B(?=(...)+$)/,/g
|