in reply to Re: Golfing cryptosums (218=>176=>167)
in thread Golfing cryptosums

Looks right to me!

Best, beth

Replies are listed 'Best First'.
Re^3: Golfing cryptosums (143)
by grizzley (Chaplain) on Aug 10, 2009 at 11:15 UTC
    $;=1+shift;$t="%$;s ";@x=sort{.5-rand}A..Z;map{printf" $t+$t-$t $t ",grep 1+s/\d/$x[$&]/g,@a=map(0|rand".1e$;",0,1),'-'x$;,$a[0]+$a[1]}1. +.pop

    BrowserUK's solution, only improved a little. Few quick tricks:

    • plain enter used instead of \n
    • s///e used instead of eval"y///" - it is almost always shorter
    • int ... can be shorter: 0|... or 0^...