Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Dumb solution in Clear category for Roman Numerals by obone
def checkio(data):
roman = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
arab = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
result = ''
for i in range(len(roman)):
result += roman[i] * (data // arab[i])
data %= arab[i]
return result
June 26, 2019
Comments: