Solved LeetCode program · 461 of 1,000
#0650 · 2 Keys Keyboard
Original English source
The cells is 3. The moves is 0. The divisor is 2.
Repeat while cells is more than 1.
If cells modulo divisor is 0, add divisor to moves, set cells to cells divided by divisor. If cells modulo divisor is not 0, add 1 to divisor.
Show moves.
Expected stdout
3