[ create a new paste ] login | about

Link: http://codepad.org/gYCJjxxu    [ raw code | fork ]

d3m3vilurr - Python, pasted on Feb 22:
1
2
3
s=p=0
for x in raw_input():x=dict(zip('IVXLCDM',(1,5,10,50,100,500,1000)))[x];s+=(x,x-p-p)[p<x];p=x
print s


Create a new paste based on this one


Comments: