3 ms·
"The reason I wanted to try the solution that I posted is that I didn't want to include IV, IX, XC, ... into the list of symbols as they are made up of base sym
by platz 12y ago
"The reason I wanted to try the solution that I posted is that I didn't want to include IV, IX, XC, ... into the list of symbols as they are made up of base symbols (just for the sake of the exercise)."
An interesting choice - it seems to make the problem harder than it should be.
This is really solvable in about 6-8 lines of code otherwise.