Roman Tablets (Strings)
Convert an integer from 1 to 3999 to Roman numerals.
Input: One integer.
Output: The Roman numeral.
Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Use the table 1000 M, 900 CM, 500 D, 400 CD, 100 C … 4 IV, 1 I and subtract greedily.