Problem 957 · Medium

Prison Cells After N Days

Simulate daily updates until a state repeats, then skip whole cycles with modular arithmetic.

Open the interactive visualisation