Rules
Only I, V, X, L, C, D, M may appear, with at most three repeats (III, XXX). Subtractive pairs IV, IX, XL, XC, CD and CM are generated and validated — input like VIIII is rejected.
Frequently asked questions
Why 1–3999?
Standard notation without overlines tops out at MMMCMXCIX (3999).
Lowercase ok?
Yes — input is uppercased before parsing.
Invalid forms?
VIIII or IL fail strict validation instead of guessing.