Linux words by croyal

while((w=readline())!=null){w=w.toLowerCase();if(w.length<5){c=-1}else{n=0;z=w.substring(2,w.length-2).split("");for(i in z){if(z[i]=='n'){n++}};c=w.length-(w.charAt(0)=='l')-(w.charAt(1)=='i')-n-(w.charAt(w.length-2)=='u')-(w.charAt(w.length-1)=='x')};print(c)}

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

download

return to the top page