https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/


Time Limit Exceeded


```python
from collections import Counter

class Solution:
    def longestSubstring(self, s: str, k: int) -> int:
        #8:31
        max_length = 0
        
        for i1 in range(len(s)):
            for i2 in range(len(s)-i1):
                subString = s[i1:i1+i2+1]
                counter = Counter(subString)
                ok = True
                for char, times in counter.most_common():
                    if times < k:
                        ok = False
                        break
                if ok:
                    length = len(subString)
                    if length > max_length:
                        max_length = length
        
        return max_length
        #8:40
        #debug until 8:42
```

