Problem 466 · Hard

Count The Repetitions

Count how many times s2 appears as a substring in an infinite repetition of s1.

Open the interactive visualisation