K Divisible Elements Subarrays
Extend each start index until it holds more than k multiples of p, and count the distinct value sequences seen along the way.
Extend each start index until it holds more than k multiples of p, and count the distinct value sequences seen along the way.