Japanese numeral for Ruby kaigi by 51b

import std.stdio;void main(){int x,n,k;for(string s;s=readln,s;writeln(n+x),n=x=0)foreach(i,p;s)i%3^1?x=i%3?k?n+=(x+!x)*(p%3?p%5?1000:100:10),0:"\x081\x06\x04\x03\x096\x02890123\x01\x056\x07"[p%19]:x:(k=p%12==9);}

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

download

return to the top page