SoFi Interview Question

Roman numeral turn to integer