>_
roman_to_int.java
Java 25.0
Not run yet

+ 7 hidden

Input
s = "XLVII"
Expected
47

XL is the subtractive pair for 40, then V adds 5 and II adds 2: 40 + 5 + 2 = 47.