Count of circles in a number aka 2581 by smkt

main(z,t){char n[64];while(gets(n)){t=0;for(z=0;n[z];)switch(n[z++]-48){case 0:t++;break;case 6:t++;break;case 8:t++;case 9:t++;}printf("%d\n",t);}}

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

download

return to the top page