text of lowercase English letters and an integer times. Count the contiguous substrings of text in which **at least one** letter occurs times times or more.
Substrings with the same content but at different positions count separately.text="banana", times=3 → 2
The letter a shows up three times only in anana (starting at index 1) and in the whole banana.
text="xyz", times=1 → 6
With times = 1 every piece qualifies: 3 + 2 + 1 = 6 of them.
text="aabb", times=2 → 5
text consists of lowercase English letters onlytext="banana", times=3
2
Run checks the first 3 tests in your browser. Submit checks all 105 tests on the server, hidden ones included.