You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a string A representing a roman numeral. Convert A into integer. A is guaranteed to be within the range from 1 to 3999. NOTE: Read more details about roman numerals at Roman Numeric System
Input Format
The only argument given is string A.
Output Format
Return an integer which is the integer verison of roman numeral string.
For Example
Input 1:
A = "XIV"
Output 1:
14
Input 2:
A = "XX"
Output 2:
20
×*/
// Create jmap of character to int, if charat(i) >= charAt(i+1) add int val else subtract