Japanese numeral for Ruby kaigi by 51b

s[9];char*p;main(i,n,x){for(;gets(p=s);printf("%d\n",n+x))for(x=n=0;*p++;p++)*p++%12+7?x="01\x023\x09\x03\x04\x068\x080\x072\x05\x01"[-*p%19]:(n+=(x?:1)*(*p%5?*p%6?10:100:1000),x=0);}

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

download

return to the top page