Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
short and clear solution in Clear category for Roman Numerals by StefanPochmann
def checkio(n):
result = ''
for arabic, roman in zip((1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1),
'M CM D CD C XC L XL X IX V IV I'.split()):
result += n // arabic * roman
n %= arabic
return result
April 18, 2015
Comments: