Mike Simmons wrote:Actually @Carey, I'm still confused. "MMMDCCCLXXVI" shows as valid according to my code, but you seem to think my code shows it as invalid?
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:MMMDCDLXLIII is indeed invalid, since it contains two D's
Piet Souris wrote:As I said, it is easy to get the preferred Roman form of any number 0...999. When you have these, it is a little more work to expand these Romans according to what my linked article says. For instance, IV can be expanded to IIII (but not to IIIIII). The longest series I found was 499:
CDXCIX
CCCCXCIX
CDXCVIIII
CCCCXCVIIII
CDLXXXXVIIII
CDXCIIIIIIIII
CCCCLXXXXVIIII
CCCCXCIIIIIIIII
CDLXXXXIIIIIIIII
CCCCLXXXXIIIIIIIII
CDXXXXXXXXXIIIIIIIII
CCCCXXXXXXXXXIIIIIIIII
There are three kinds of actuaries: those who can count, and those who can't.
There are three kinds of actuaries: those who can count, and those who can't.