Count of circles in a number aka 2581 by Endres

<?for(;$i=trim(fgets(STDIN));$x=0){foreach(str_split($i)as $j)$x+=($j%3==0&&$j!=3)?1:($j==8?2:0);echo "$x\n";}

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

download

return to the top page