Count of circles in a number aka 2581 by chocobi

M S =REPLACE(INPUT,'012356789','100001021') :F()
 C =0
L C =C + ORD(S) - 48
 S =SUBSTR(S,2) :S(L)
 OUTPUT =C :(M)
END

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

download

return to the top page