Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Dueling Flamingos: The Story of the Fonality Christmas Golf Challenge

by eyepopslikeamosquito (Canon)
on Jan 12, 2007 at 03:12 UTC ( #594299=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    II plus III minus I
    
  2. or download this
    IV
    
  3. or download this
    #!perl -lp
    map{$_.=(!y/IVXLC/XLCDM/,I,II,III,IV,V,VI,VII,VIII,IX)[$&]while s/\d//
    +;$$_=$n++}@R=0..3999;
    y/mp/-+/;s/\w+/${$&}/g;$_=$R[eval]
    
  4. or download this
    #!perl -lp
    # r() converts an arabic number (1..3999 or -3999..-1) to a roman nume
    +ral
    ...
    s''$';                         # Step 1: prepend $
    $$_=r(),$$$_=$_ for-3999..-1;  # Step 2: build two sets of symbolic re
    +ferences
    $_=${+eval};                   # Step 3: eval the expression
    
  5. or download this
    #!perl -lp040
    $s=/m/
    if/u/;($y=I1V5X10L50C100D500M1000IV4IX9XL40XC90CD400CM900)=~/$&/,$i=$t
    ++=$s^"$;">($;=$')?-$;:$;while
    s/.$//}{1while$y=~/(\D+)$i/&&$t>=$i?($_.=$1,$t-=$i):$i--
    
  6. or download this
    #!perl -lp
    @@{@@=map{$_,$_.0,$_*100}4,5,9,10}=qw(IV XL CD V L D IX XC CM X C M);f
    +or$~(@@){s/$@{$~}/"I "x$~/ge}s/I//while s/m\w* +I/m /;$~=y/I//cd;s/I{
    +$~}/$@{$~}||$&/gewhile$~--
    
  7. or download this
        { in => "MD plus I\n",
          out => 'MDI' . "\n" },
        { in => "MD minus I\n",
          out => 'MCDXCIX' . "\n" },
    
  8. or download this
    #!perl -lp
    $==$_,s!.!y$IVCXL91-I0$XLMCDXVIII$dfor$_[$=].=4x$&%1859^7;5!egfor+0..3
    +999;@&{@_}=0..@_;y/il-z/-+/d;s/\w+/$&{$&}/g;$_=$_[eval]
    
  9. or download this
    #!perl -lp
    s!.!y$IVCXL91-I0$XLMCDXVIII$dfor$X[$_].=4x$&%1859^7!egfor+0..3999;@Y{@
    +X}=0..@X;y/m/-/;s/\w+/+$Y{$&}/g;$_=$X[eval]
    
  10. or download this
    #!perl -lp
    map{y/IVXLC/XLCDM/,s!\d!$&^4?$&^9?V x($&>3).I x($&%5):IX:IV!ewhile//;$
    +$_=$n++}@d=0..3999;y/m/-/;s/\w+/+${$&}/g;$_=$d[eval]
    
  11. or download this
    #!perl -lp
    sub'_{$;=0;($;.=5x$_*8%29628)=~y$IVCXL426.-X$XLMCDIVX$dfor/./g;$;}y;mp
    +;-+;;s>\w+>(grep$&eq&_,1..1e4)[0]>eg;$_=_$_=eval
    
  12. or download this
    #!perl -lp
    @%=map{my$a;s/./y!IVCXL91-80!XLMCDXVIII!dfor$a.=4x$&%1859^7/eg;$$a=$/-
    +-;$a}0..3999;y/i/-/;s/\w+/${$&}/g;$_=$%[-eval]
    
  13. or download this
    #!perl -pl
    y/i-z/-+/s;for$a(1..4e3){$a=~s#.#($n[$a].=4x$&%1859^7)=~y$IVCXL91-I0$X
    +LMCDXVIII$d;s/\b$n[$a]\b/$a/g#ge}$_=$n[eval]
    
  14. or download this
    #!perl -pl
    @;=map{$a=0;($a.=4x$_%1859^7)=~y!IVCXL91-80!XLMCDXVIII!dfor/./g;$$a=$_
    +;$a}s''$'>y/isl-{/-$+
    /..3999;$_=$;[eval]
    
  15. or download this
    #!perl -pl
    s|.|y;CLXVI624.-=;MDCLXXVI;dfor$$_.=5x$&*8%29628;$&|ge,$$$_=$_^Kfor-4e
    +3..o;s;\w+;${$&}|$&&'-';ge;$_=${+eval}
    
  16. or download this
    #!perl -lp
    y,iul-~,-$+,d,$_=eval,${$@}=1..!s/./y@IVCXL91-:0@XLMCDXVIII@dfor$@.=4x
    +$&%1859^7/egfor$...3999,u.$_;$_=$@
    
  17. or download this
    #!perl -pl
    $_=${s!.!y$XLIVC246,-:$CDXLMVIX$dfor$$_.=8x$&*5%29628;$$$_=$_!gefor-4e
    +3..s''$'/y/isl-~/-$+/d;eval}
    
  18. or download this
    #!perl -pl
    s!.!y$IVCXL426(-:$XLMCDIVX$dfor$$_.=5x$&*8%29628;$$$_=$_!egfor-4e3..y/
    +iul-}/-$+ /%s''$';*_=eval
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://594299]
Approved by GrandFather
Front-paged by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-09-30 10:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (363 votes), past polls