Back to task

90 symbols python3
Mon Sep 12 17:31:36 2016 Sait2000
x=p=0
for i in map("IVXLCDM".find,input()):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