Roman numeral by Lost_dog

m@main=getLine>>=print.sum.scanr(#)0.map(t.fromEnum)>>m
x#y|y==x*5||y==x*10= -x|1>0=x
t x=2^mod(div(51^x)74)5*5^mod(div(34^x)127)4

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

download

return to the top page