char*c,s[];main(x){for(;c=gets(s);printf("%d\n",x))for(x=0;*c;)x+="1000101021"[*c++-48]-48;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page