Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Golf: Magic Formula for Roman Numerals

by eyepopslikeamosquito (Canon)
on Feb 18, 2007 at 07:50 UTC ( #600665=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #     12345678901234567890123456789012345
    sub r{1+4*y/VLD//.E.(3*/M/+2*/C|D/+/X|L/)}
    
  2. or download this
    3*/M/+2*/C|D/+/X|L/
    
  3. or download this
    for my $m (1 .. 999) {
      for my $n (1 .. 99) {
    ...
        }
      }
    }
    
  4. or download this
    #include <stdio.h>
    #define magic(v,m,n,p) ((v) % (m) % (n) % (p))
    ...
      }
      return 0;
    }
    
  5. or download this
    m=75 n=50 p=4: M=3 D=2 C=2 L=1 X=1 V=0 I=0
    m=734 n=13 p=4: M=3 D=2 C=2 L=1 X=1 V=0 I=0
    m=737 n=92 p=5: M=3 D=2 C=2 L=1 X=1 V=0 I=0
    
  6. or download this
    ord()x3%75%50%4
    
  7. or download this
    3*/M/+2*/C|D/+/X|L/
    
  8. or download this
    sub m1{1+4*y/VLD//.E.ord()x3%75%50%4}
    sub m2{1+4*y/VLD//.E.ord()*49/3%54%4}
    ...
    sub d2{1 .E.ord()*38/9%62%4>>y/VLD//}
    sub d3{1 .E.~-ord()*41%52%5>>y/VLD//}
    sub d4{1 .E.(8^ord)*29%65%4>>y/VLD//}
    
  9. or download this
    sub d5{1 .E.(72^ord)*5/7%5>>y/VLD//}
    sub d6{1 .E.(6^ord)%72%7%4>>y/VLD//}
    sub d7{1 .E.(76^2+ord)%7%5>>y/VLD//}
    
  10. or download this
    sub d8{1 .E.(3^77%ord)%7>>y/VLD//}
    sub m8{5**y/VLD//.E.(42^88*ord)%5}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2015-07-08 03:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls