Convert a roman numeral to an integer.
Given a roman numeral as a string, convert it to an integer.
Examples:
III
-> 3
IV
-> 4
IX
-> 9
LVIII
-> 58
MCMXCIV
-> 1994
The input is guaranteed to be a valid roman numeral in the range [1, 3999]
.
# | Size | % | Users |
---|---|---|---|
#1 | 62 c. | Top 29% | |
#2 | 87 c. | Top 43% | |
#3 | 106 c. | Top 71% | |
#4 | 147 c. | Top 86% | |
#5 | 195 c. | Top 100% |