Roman to Integer
Problem
Given a roman numeral, convert it to an integer.
The answer is guaranteed to be within the range from 1 to 3999.
Example
IV -> 4
XII -> 12
XXI -> 21
XCIX -> 99
Note
What is Roman Numeral?
Given a roman numeral, convert it to an integer.
The answer is guaranteed to be within the range from 1 to 3999.
IV -> 4
XII -> 12
XXI -> 21
XCIX -> 99
What is Roman Numeral?