Count Beautiful Substrings II
Combine prefix balance with a divisibility-derived period in one key. Requires factorization and modular arithmetic.
Combine prefix balance with a divisibility-derived period in one key. Requires factorization and modular arithmetic.