Can someone please tell me why this solution doesn’t work for POGOSTCK problem

```
def getMax(arr):
s = 0
for i in range(len(arr)):
sm = sum(arr[i::1])
s = max(sm , s)
return s
```

for _ in range(int(input())):

n ,k = map(int, input().split())

a = list(map(int, input().split()))

maxi = 0

if k >= n:

print(max(a))

else:

s = 0

for i in range(k):

sm = getMax(a[i::k])

s = max(s , sm)

print(s)

Thanks for Your time and sorry if it was a stupid question

And please ignore the indentation errors in here