Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
3-liner: based on 7-liner: based on best Roman Numerals solution solution in Creative category for Reverse Roman Numerals by flpo
reverse_roman = lambda n: __import__('functools').reduce(
lambda a, r: (a[0] + a[1].count(r[0])*r[1], a[1].replace(r[0], '')),
zip('CM CD XC XL IX IV M D C L X V I'.split(),(900,400,90,40,9,4,1000,500,100,50,10,5,1)),(0,n))[0]
July 16, 2017