Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I would strongly appreciate someone laying out the calculation in detail for the above coming out with an answer of 146. The following chart that counts bottom to top for obvious reasons gives me 164.
ball score total 5 5 164 / 16 159 6 6 143 3 3 137 X 27 134 X 17 107 7 7 90 0 0 83 4 4 83 3 3 79 X 20 76 4 4 56 / 18 52 8 8 34 1 1 26 3 3 25 / 16 22 6 6 6
If that is correct, then the following code is correct. If it is wrong, then I misunderstand the problem and don't have a solution at 103 characters.
sub hole { # 1 2 3 4 5 6 +7 8 9 10 #234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901012345 $i=$s=0;for(@_=(0,0,reverse@_)){$s+=$_[$i-1]+$_[$i-(/X/?2:-1)],$_=/X/? +10:10-$_[$i+1]if/\D/;$s+=$_;$i++}$s }

In reply to Re (tilly) 1: (Golf) Let's go bowling by tilly
in thread (Golf) Let's go bowling by virtualsue

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (2)
    As of 2014-08-31 02:44 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (294 votes), past polls