NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Anyone tackled the golf puzzle yet? (Score:1)
Jason
Reply to This
Re:Anyone tackled the golf puzzle yet? (Score:1)
Re:Anyone tackled the golf puzzle yet? (Score:1)
Fun way to kill a few hours... :)
Jason
I'm diseased!! ;) (Score:1)
78!
Jason
Re:I'm diseased!! ;) (Score:1)
Re:I'm diseased!! ;) (Score:1)
May try & tackle this with another approach...
Jason
Re:I'm diseased!! ;) (Score:1)
Re:I'm diseased!! ;) (Score:1)
(Yeah, I'm diseased, too. So, what's the news?)
Re:I'm diseased!! ;) (Score:1)
Re:I'm diseased!! ;) (Score:1)
Jason
PS: hfb - your husband is Eeeevil! ;)
Re:I'm diseased!! ;) (Score:3, Funny)
What is this, a geek porn satire? LOL :)
Re:Anyone tackled the golf puzzle yet? (Score:2, Informative)
Take a look at Ben Tilly's 48 and Blake Miller's 43 in this thread at Perl Monks [perlmonks.org].
Re:Anyone tackled the golf puzzle yet? (Score:1)
send mine to the monks.
Re:Anyone tackled the golf puzzle yet? (Score:1)
So my original final was 59...
$_=shift;y/0-9A-Z/\0-#/;(s/.//,($a*=36)+=ord$&)while length
But using the monks' trick's I can get down to 43, too:
$_=pop;y/0-9A-Z/\0-#/;($a*=36)+=ord for/./g
Yes, no output. The rules didn't ask for it... (And as someone noted, reading the rules really creatively allows for one character replies...)
(Okay, so I'm bored, trying to keep this thread alive on my own... :-)
Re:Anyone tackled the golf puzzle yet? (Score:1)
it in 39 like this:
map{($t*=36)+=/\d/?$_:-55+ord}pop=~/./g
Re:Anyone tackled the golf puzzle yet? (Score:1)
Re:Anyone tackled the golf puzzle yet? (Score:1)
Re:Anyone tackled the golf puzzle yet? (Score:1)
Re:Anyone tackled the golf puzzle yet? (Score:1)
I'm really impressed with all of these solutions. I don't understand Blake's 43 stroke solution, but it's late here. :)
I actually understand this solution (vsergu's) and I really like it - similiar to the functionality of mine, but a better twist on the math and lots of cool shortcuts.
Jason
Re:Anyone tackled the golf puzzle yet? (Score:1)
$_=shift;if(m/\d/){print;}else{print ord()-55;}
There is probably something wrong in there, and there is no checking of the input, but it is a fairly simple solution. I think I need to subscriber to the FWP list.
Bugger (Score:1)
Oh well, back to the drawing board
Re:Anyone tackled the golf puzzle yet? (Score:1)
$_=pop;print(/\d/?$_:-55+ord)
Jason