- or download this
use strict;
use warnings;
...
$got eq $i or die "expected '$i' got '$got'\n";
}
print "successful\n";
- or download this
s!.!y$IVCXL426(-:$XLMCDIVX$dfor$$_.=5x$&*8%29628;${"$$_
"}=-$_!egfor-4e3..0;print${<>}
- or download this
sub arabic {
my($arg) = shift;
...
}
$arabic;
}
- or download this
$arabic -= 2 * $last_digit if $last_digit < $digit;
- or download this
I1V5X10L50C100D500M1e3=~$_,$\-=2*$}x($}<$')-($}=$')for<>=~/./g;print
- or download this
#!perl -lp
s#\d#!($\+=$.*$&*(2cmp$'))#eg,$..=0while y/MDCLXVI/CLXVI51/
- or download this
#!perl -n
++$I;$$_=$.*=$^F^=7for V,X,L,C,D,M;
print"I=$I V=$V X=$X L=$L C=$C D=$D M=$M\n";
- or download this
I=1 V=5 X=10 L=50 C=100 D=500 M=1000
- or download this
#!perl -p
++$I;$$_=$.*=$^F^=7for VXLCDM=~/(.)/g;
s!!($$1<${_&$'}?'-':'+').$$1!eg;$_=eval
- or download this
$b=++$I;$$_=$b*=$^F^=7for V,X,L,C,D,M;
$\+=$n-$\%$n*2while$n=${+getc};print
- or download this
use List::Util 'reduce';
print reduce{$a+$b*($b+1<=>$a)}map{/./;$|--&&(M999D499C99L49X9V4I=~$&+
+$')*y///c}reverse<>=~/((.)\2*)/g
- or download this
I1V5X10L50C100D500M1e3=~$_,$\-=2*$}x($}<$')-($}=$')for<>=~/./g;print
- or download this
$\+=$'-2*$'*(-$'>I1V5X10L50C100D500M1e3=~$_-$')for<>=~/./g;print
- or download this
1st 60 robin Perl
2nd 61 arpad Perl
...
8th 73 bitsweat Ruby
9th 73 jojo Perl
10th 75 shinh Perl
- or download this
$/=\1;$\+=-$'*(-$'<=>I1V5X10L50C100D500M1e3=~$_-$')for<>;print
- or download this
$\+=$'-2*$'%(I1V5X10L50C100D500M1e3=~$_*$')for<>=~/./g;print
- or download this
I1V5X10L50C100D500M1e3
- or download this
M999D499C99L49X9V4I
- or download this
$\+=$z-2*$z%($z=M999D499C99L49X9V4I=~$_+$')for<>=~/./g;print
- or download this
$\+=$z-2*$z%($z=1 .E.(3^77%ord)%7>>y/VLD//)for<>=~/./g;print
$\+=$z-2*$z%($z=.5**y/VLD//.E.(3^77%ord)%7)for<>=~/./g;print
...
$\+=$z-2*$z%($z=5**y/VLD//.E.71248%ord()%5)for<>=~/./g;print
$\+=$z-2*$z%($z=5**y/VLD//.E.(3&57532/ord))for<>=~/./g;print
$\+=$z-2*$z%($z=.1.E.(3^85%ord)%7>>y/VLD//)for<>=~/./g;print
- or download this
$\+=$z-2*$z%($z=VLD=~$_*5+IXCM=~$_."E@-")for<>=~/./g;print