Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
max = 0
index = 0
res = 0

a = n - k + 1
b = k

for i in range(a):
    for j in range(b):
        score.append(List[i+j])
    pre = sum(score)

    if max < pre:
        max = pre
        index = i
        pre = 0
    else:
        pre = 0
    score.clear()

for i in range(index, index+k):
    res += 1 + 0.5 * (List[i]-1)

print(res)

Fixed submission:
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
score1 = []

def cal_score(num):
    return 1 + 0.5 * (num - 1)

score.append(cal_score(List[0]))

for i in range(1, n):
    score.append(score[i - 1] + cal_score(List[i]))
    
score1.append(score[k - 1])
m = 0
for i in range(k, n):
    score1.append(score[i] - score[m])
    m += 1

#print(score)    
#print(score1)
print(max(score1))

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
max = 0
index = 0
res = 0

a = n - k + 1
b = k - 1

for i in range(a):
    pre = List[i]
    for j in range(b):
        pre += List[i+j]
    #print(max)

    if max < pre:
        max = pre
        index = i
        pre = 0
    else:
        pre = 0
    
#print(index)
for i in range(index, index+k):
    res += 1 + 0.5 * (List[i]-1)
    #print(List[i])

print(res)

Fixed submission:
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
score1 = []

def cal_score(num):
    return 1 + 0.5 * (num - 1)

score.append(cal_score(List[0]))

for i in range(1, n):
    score.append(score[i - 1] + cal_score(List[i]))
    
score1.append(score[k - 1])
m = 0
for i in range(k, n):
    score1.append(score[i] - score[m])
    m += 1

#print(score)    
#print(score1)
print(max(score1))

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
max = 0
index = 0
res = 0

for i in range(n-k+1):
    pre = List[i]
    for j in range(k-1):
        pre += List[i+j]
    #print(max)

    if max < pre:
        max = pre
        index = i
        pre = 0
    else:
        pre = 0
    
#print(index)
for i in range(index, index+k):
    res += 1 + 0.5 * (List[i]-1)
    #print(List[i])

print(res)

Fixed submission:
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
score1 = []

def cal_score(num):
    return 1 + 0.5 * (num - 1)

score.append(cal_score(List[0]))

for i in range(1, n):
    score.append(score[i - 1] + cal_score(List[i]))
    
score1.append(score[k - 1])
m = 0
for i in range(k, n):
    score1.append(score[i] - score[m])
    m += 1

#print(score)    
#print(score1)
print(max(score1))

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = [1, 1.5, 2, 2.5, 3, 3.5]
max = 0
index = 0
res = 0

for i in range(n-k+1):
    pre = List[i]
    for j in range(k-1):
        pre += List[i+j]
    

    if max < pre:
        index = i
        pre = 0
    else:
        pre = 0
    
#print(index)
for i in range(index, index+k):
    res += score[List[i]-1]
    #print(List[i])

print(res)

Fixed submission:
n, k = map(int, input().split())
List = list(map(int, input().split()))
score = []
score1 = []

def cal_score(num):
    return 1 + 0.5 * (num - 1)

score.append(cal_score(List[0]))

for i in range(1, n):
    score.append(score[i - 1] + cal_score(List[i]))
    
score1.append(score[k - 1])
m = 0
for i in range(k, n):
    score1.append(score[i] - score[m])
    m += 1

#print(score)    
#print(score1)
print(max(score1))