Write a program that reads Roman numbers
and prints their values.
Input
Input consists of several Roman numbers,
as explained in
the exercise .
Every number ends in a period.
Output
For each Roman number, print its value.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML and PNG versions of the statement
are also given to help you, but they may contain some content
that is not well displayed. In case of doubt, always use the PDF.
Public test cases
Input
I.
IV.
X.
XL.
XLI.
XVI.
MMDCCVIII.
CMXCIX.
MMMV.
Output
I = 1
IV = 4
X = 10
XL = 40
XLI = 41
XVI = 16
MMDCCVIII = 2708
CMXCIX = 999
MMMV = 3005
Input
I.
IV.
X.
XL.
XLI.
XVI.
MMDCCVIII.
CMXCIX.
MMMV.
Output
I = 1
IV = 4
X = 10
XL = 40
XLI = 41
XVI = 16
MMDCCVIII = 2708
CMXCIX = 999
MMMV = 3005