Binary Prefix Divisible By 5
For each prefix of a binary string, report whether the number it spells is divisible by five. The remainder tracks the value modulo five as each bit is read.
For each prefix of a binary string, report whether the number it spells is divisible by five. The remainder tracks the value modulo five as each bit is read.