Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Roman Numerals solution in Creative category for Roman Numerals by W.Zalicki
def checkio(data):
coding = 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"])
result = []
for d, r in coding:
while data >= d:
result.append(r)
data -= d
return ''.join(result)
Nov. 5, 2017