Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Roman Numerals by GodMode-On
def checkio(data):
arab = [1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000]
roman = ['I','IV','V','IX','X','XL','L','XC','C','CD','D','CM','M']
res = ""
i = len(arab)-1
while data > 0:
if data >= arab[i]:
res += roman[i]
data -= arab[i]
else:
i -= 1
return res
Jan. 19, 2015
Comments: