#104
Write Roman Numerals
 

Difficulty:Medium
Topics:strings math


This is the inverse of Problem 92, but much easier. Given an integer smaller than 4000, return the corresponding roman numeral in uppercase, adhering to the subtractive principle.
test not run
(= "I" (__ 1))
test not run
(= "I" (__ 1))
test not run
(= "XXX" (__ 30))
test not run
(= "IV" (__ 4))
test not run
(= "CXL" (__ 140))
test not run
(= "DCCCXXVII" (__ 827))
test not run
(= "MMMCMXCIX" (__ 3999))
test not run
(= "XLVIII" (__ 48))


Code which fills in the blank: