The TransCompilator

Solved LeetCode program · 779 of 1,000

#1015 · Smallest Integer Divisible by K

Medium Math chunk-16.md

Original English source

The divisor is 3. The remainder is 0. The length is 0. The answer is -1.
Repeat while length is less than divisor and answer is less than 0.
Add 1 to length. Set remainder to (remainder times 10 plus 1) modulo divisor. If remainder is 0, set answer to length.

Show answer.

Open in Playground Browse all 1,000 problems

Expected stdout

3