Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: (Golf) Let's go bowling

by rchiav (Deacon)
on Aug 09, 2001 at 01:41 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://103247]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-29 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found