Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Home station_Romantask solution in Clear category for Roman Numerals by dientu
# migrated from python 2.7
numeral_map = list(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')
))
def checkio(i):
result = []
for integer, numeral in numeral_map:
count = int(i / integer)
print('i', i, 'integer', integer, 'numeral', numeral, 'count', count)
result.append(numeral * count)
i -= integer * count
return ''.join(result)
#replace this for solution
May 28, 2014