SoFi interview question

Roman numeral turn to integer