1

To make the text solution clearer, I will assume that $M - 1$ divides $N- 1$. Otherwise, it should be
$$N + \left\lfloor \frac{N-1}{M-1} \right\rfloor.$$
It should be clear that an optimal strategy has at any time only one candle used to lit up the room.
Hence, we may proceed as follows: First, w...