Back to task

84 symbols ruby2.0
Wed Aug 17 19:06:57 2016 vitormd
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