Project Euler – Problem 89 Solution
Problem The rules for writing Roman numerals allow for many ways of writing each number (see FAQ:Roman Numerals). However, there is always a “best” way of writing a particular number. For example, the following represent all of the legitimate ways of writing the number sixteen: IIIIIIIIIIIIIIII VIIIIIIIIIII VVIIIIII XIIIIII VVVI XVI The last example being …