Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: (Golf) Let's go bowling

by rchiav (Deacon)
on Aug 09, 2001 at 01:41 UTC ( #103247=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    $|=1;
    ...
        }
        $t
    }
    
  2. or download this
    sub a {
    map{s#(/|X)#10#}@_;while($_=shift){if(/10/){$t+=($_[0]<10&&$_[1]==10?2
    +0:10+$_[0]+$_[1])}else{$t+=($_[0]==10?$_[1]+shift:$_+shift)}last if++
    +$f==10}$t
    }
    
  3. or download this
    sub a {
    map{s#(/|X)#10#}@_;for(1..10){$_=shift;/10/?{$t+=($_[0]<10&&$_[1]==10?
    +20:10+$_[0]+$_[1])}:{$t+=($_[0]==10?$_[1]+shift:$_+shift)}}$t
    }
    
  4. or download this
    sub a {
    map{s#[/X]#10#}@_;for(0..9){$_=shift;/10/?$t+=$_[0]<10&&$_[1]==10?20:1
    +0+$_[0]+$_[1]:($t+=$_[0]==10?$_[1]+shift:$_+shift)}$t
    }
    

Log In?
Username:
Password:

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

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

    For retirement, I am banking on:










    Results (149 votes), past polls