Japanese numeral for Ruby kaigi by nn

for(;l=readline(q=v=0);print(v+q))for(i=-1;c=l[i+=3];q=p<1||l[i-1]=='\x8d'?(x=p<7?100+p*90:1e3,v+=q?q*x:x,0):p)p='\xbe\x80\x8c\x89\x9b\x94\xad\x83\xab\x9d'.indexOf(c)

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

download

return to the top page