Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Roman Numerals by tokiojapan55
def checkio(data):
PATTERN = ['', '1', '11', '111', '12', '2', '21', '211', '2111', '13']
CHARS = ['IVX', 'XLC', 'CDM', 'M??']
result = ""
for i in range(4):
result = PATTERN[data % 10].replace('1', CHARS[i][0]).replace('2', CHARS[i][1]).replace('3', CHARS[i][2]) + result
data //= 10
return result
June 15, 2020