Back to task

91 symbols python2
Thu Sep 4 18:44:42 2014 xsot
x=p=0
for c in raw_input():i="IVXLCDM".find(c);n=5**(-~i/2)<<i/2;x+=n-p*2*(n>p);p=n
print x


Leave a comment

Parsed as Markdown

Login to leave a comment