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
    }