Problems > Roman Numerals > Editorial

Roman Numerals — Solution & Editorial

Back to the Problem

Greedily subtract the largest symbol value that still fits, including the six subtractive pairs.

Complexity: O(1)