> > ...
>
> OK, then, how about:
> 
>     #!perl -l
>     $m=pop;map$n+=$m%$_?0:$_,1..$m/2;print$n
> 
> Which is still a 43.  The map saves a couple of
> characters.  I don't think this one has legs, tho';
> I can't see much more that can be reduced from it.
> But then, I'm not a very good golfer.

It might not be the winning solution, but you missed
a character optimisation suggested earlier:

#!perl -l
map$n+=$m%$_?0:$_,1..($m=pop)/2;print$n

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Reply via email to