Roman numeral by notogawa

m@main=getLine>>=print.foldr(#)0>>m
c#s=s+sum[n*signum(4*n-s)|(a,n)<-zip"IVXLCDM"z,a==c]
z=1:5:map(10*)z

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page