Problem 1352 · Medium

Product of the Last K Numbers

Keep prefix products since the last zero, so the product of the last k numbers is one division.

Open the interactive visualisation