You learned that some problems have simple mathematical solutions. Before writing loops or complex data structures, ask yourself: can I solve this with just a formula or a condition? Edge cases matter enormously.
The w = 2 case is easy to miss if you only think "even means splittable." Always test the smallest valid inputs and boundary values. Divisibility problems often reduce to modular arithmetic.
The modulo operator (%) tells you the remainder after division. Get comfortable with it since you'll use it in many problems involving cycles, alternating patterns, or divisibility checks.