🦍 Dumb python3 solution by Ape 🦍
Intuition🦍 Ape recomputes the counter for each iteration instead of sliding a window 🦍🦍 Ape no slide cos not enough bananas 🍌
1 <= n == nums.length <= 50Code🦍 A
# Intuition

🦍 Ape recomputes the counter for each iteration instead of sliding a window 🦍

🦍 Ape no slide cos not enough bananas 🍌
`1 <= n == nums.length <= 50`



# Code
```python3 []
class Solution:
    def findXSum(self, nums: List[int], k: int, x: int) -> List[int]:
        def get_max(arr):
            cc = [(-c, -e) for e,c in Counter(arr).items()]
            heapify(cc)
            s = 0
            for _ in range(x):
                if cc:
                    c, e = heappop(cc)
                    s += e*c
            return s
        val = []
        for i in range(0, len(nums)-k+1):
            arr = nums[i:i+k]
            val.append(get_max(arr))
        return val

```
🦍 Ape together stronk 🦍
['Python3']