Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Creative category for Roman Numerals by gyahun_dash
import itertools as it, operator as op
tri = lambda i, v='': [v + i * j for j in range(1, 4)]
dec = lambda i, v='', x='': [''] + tri(i) + [i + v, v] + tri(i, v) + [i + x]
nums = tuple(it.starmap(dec, ('M', 'CDM', 'XLC', 'IVX')))
def checkio(number):
return ''.join(map(op.getitem, nums, map(int, '{:0=4}'.format(number))))
Aug. 30, 2014
Comments: