for(i<-0 to'\xcf\xa8';s="IVXLCDM")println{def f(i:Int,j:Int)={val t=""+s(j) t*(i%5/4)+(""+s(j+(i+1)/5))*((i+3)/7)+t*(i%5%4)} f(i/100,4)+f(i/10%10,2)+f(i%10,0)}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page