Problem 1018 · Easy

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.

Open the interactive visualisation