Japanese numeral for Ruby kaigi by 51b

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

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

download

return to the top page