Problem 3790 · Medium

Smallest All-Ones Multiple

Track the remainder of the all-ones numbers 1, 11, 111, ... modulo k until one of them divides evenly.

Open the interactive visualisation