Back to task

84 symbols ruby2.0
Mon Oct 6 14:48:32 2014 fl00r
x=l=0
$<.chars{|a|c='IVXLCDM'=~/#{a}/;c=5**(c%2)*10**(c/2);x+=c;c>l&&x-=l*2;l=c}
p x


Leave a comment

Parsed as Markdown

Login to leave a comment