Back to task

91 symbols ruby2.0
Sun Oct 5 04:20:42 2014 fl00r
x=l=0
$<.chars{|a|c='IVXLCDM'.index(a)||next;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