Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: Re: (Golf) Let's go bowling

by dga (Hermit)
on Aug 15, 2001 at 00:32 UTC ( #104873=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: (Golf) Let's go bowling
in thread (Golf) Let's go bowling

Ok last draft, including dragonchild's compressions and optimizations and correcting the case 6 problem which actually saves 3 more bytes.

map{s/X/10/;s#/#10-$p#e;$p=$_}@c=@_;$t=$f=$h=0;while(@_){$s=shift@c;$_ +=shift;/[X\/]/&&($t+=$s+$c[0]+(/X/?$c[1]:0),$h=0,++$f>9?last:next);$h +=$h?($f++,0):1;$t+=$s}$t

163 bytes which is basically 1/2 of the previous length.

Thanks again dragonchild.


Comment on Re: Re: Re: Re: (Golf) Let's go bowling
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://104873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-07-28 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls