System.in.eachLine{l=it.count println l<5?-1:(0..<l).sum{i->"UXLIN"[i<4?i:4]-it[i-2].toUpperCase()?1:0}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page