Problem 3337 · Hard

Total Characters in String After Transformations II

Each letter expands into the next nums letters, so the counts follow a 26 by 26 transition table that is raised to the power t by repeated squaring.

Open the interactive visualisation