Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P = [sum(p[i:i+K]) for i in range(N-K+1)]
print((max(SUM_P)+K)/2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P = []
for i in range(N-K+1):
    SUM_P.append(sum(p[i:i+K]))
print((max(SUM_P)+K)/2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, K = map(int, input().split())
p = list(map(int, input().split()))
# p = [int(i) for i in p]
# p = [((int(i)+1)/2) for i in p]
arr_1d = np.array(p)
SUM_P = []
for i in range(N-K+1):
    SUM_P.append(np.sum(arr_1d[i:i+K]))
print((max(SUM_P)+K)/2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, K = map(int, input().split())
p = input().split()
p = [int(i) for i in p]
arr_1d = np.array(p)
SUM_P = []
for i in range(N-K+1):
    SUM_P.append(np.sum(p[i:i+K]))
print((max(SUM_P)+K)/2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, K = map(int, input().split())
p = input().split()
p = [((int(i)+1)/2) for i in p]
arr_1d = np.array(p)
SUM_P = []
for i in range(N-K+1):
    SUM_P.append(np.sum(p[i:i+K]))
print(max(SUM_P))

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
p = input().split()
p = [((int(i)+1)/2) for i in p]
SUM_P = []
for i in range(N-K+1):
    SUM_P.append(sum(p[i:i+K]))
print(max(SUM_P))

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
p = input().split()
p = [((int(i)+1)/2) for i in p]
SUM_P = 0
for i in range(N-K+1):
    cand = sum(p[i:i+K])
    if  SUM_P < cand:
        SUM_P = cand
    else:
        pass
print(SUM_P)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))
SUM_P=sum(p[0:K])
all_sum_p=[SUM_P]
for i in range(N-K):
    SUM_P=SUM_P-p[i]+p[i+K]
    all_sum_p.append(SUM_P)
print((max(all_sum_p)+K)/2)