develooper Front page | perl.golf | Postings from January 2007

Re: New Golf

Thread Previous | Thread Next
From:
Daniel Cutter
Date:
January 17, 2007 11:04
Subject:
Re: New Golf
Message ID:
45AE7345.1030902@agac.de
I was just wondering, reading all your talk about your solutions to the 
fonality golf, I would assume that everyone converted in arabic, 
calculated and then converted back to roman. When I first had a look at 
the problem I thought that that would be the obvious way to do it. At 
the time I thought it would be shorter though to calculate in roman and 
just drop the conversion. My first solution was with all the conversion. 
I say that Ton had allready posted a 100 so I thought he must have gone 
the other way. So I tried. My best solution (247) did just that. Based 
on the Wikipedia article I tried to add and subtract the roman numerals 
directly. Did anybody else do that?

-- 
Daniel Cutter
use Convert::Morse q!as_ascii!;$d=q!%-";_:;."=.L<o.=fo=:..<=>|>_;.|!;for
(split/!/,'. !> -!o ; |!Lf --""!_% !<::!, %!"- != %!|%;!:;;!f-;!%;-!;.')
{($a,$b)=/(.)(.+)/;$d=~s!\Q$a!$b!g}$_=as_ascii$d;s!(\w+)!\u\L$1!g;;print



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About