Question 10
Let $m \gt 1$ be a fixed positive integer. For a nonempty string of base-ten digits $S$, let $c(S)$ be the number of ways to split $S$ into contiguous nonempty strings of digits such that the base-ten number represented by each string is divisible by $m$. These strings are allowed to have leading zeroes.
In terms of $m$, what are the possible values that $c(S)$ can take?
For example, if $m = 2$, then $c(1234) = 2$ as the splits $1234$ and $12 \mid 34$ are valid, while the other six splits are invalid.
In terms of $m$, what are the possible values that $c(S)$ can take?
For example, if $m = 2$, then $c(1234) = 2$ as the splits $1234$ and $12 \mid 34$ are valid, while the other six splits are invalid.