Opto Investments interview question

Dealing with Roman numerals conversion