Roman numeral by murky-satyr

System.in.eachLine{a=it as List
m=[I:i=1,V:5,X:10,L:50,C:100,D:500,M:1e3]
println a.sum{n=m[it];n<m[a[i++]]?-n:n}}

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

download

return to the top page