Problem 1015 · Medium

Smallest Integer Divisible by K

Find the length of the smallest number made only of ones that is divisible by k, or report that none exists. The remainder track shows each new remainder as another digit is appended.

Open the interactive visualisation