Buggy python submission (verdict: Time Limit Exceeded):
import copy,time

n, k = input().split()
m = list(map(int, input().split()))
ans = 0
kazu =[]
kai = []
kitai = 0
kazu = [(a+1) /2 for a in m]

for x in range(int(n) - (int(k)-1)):
    kitai = kazu[x:x+int(k)]
    if ans < sum(kitai):
        ans = sum(kitai)

print(ans)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
import copy,time

n, k = input().split()
m = list(map(int, input().split()))
ans = 0
kazu =[]
kai = []
kitai = 0

for x in range(int(n) - (int(k)-1)):
    kazu = []
    kazu = m[x:x+int(k)]
    if ans < sum(kazu):
        ans = sum(kazu)
        kai = copy.deepcopy(kazu)

for j in range(int(k)):
    kitai += (kai[j]+1) /2

print(kitai)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n, k = input().split()
m = list(map(int, input().split()))
ans = 0
kazu =[]
kai = []
kitai2 = 0
for x in range(int(n) - (int(k)-1)):
    kazu = []
    kazu = m[x:x+int(k)]
    if ans < sum(kazu):
        ans = sum(kazu)
        kai = copy.deepcopy(kazu)

for j in range(int(k)):
    kitai = 0
    for g in range(kai[j]):
        kitai += g+1
    kitai2 += kitai / kai[j]
print(kitai2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n, k = input().split()
m = list(map(int, input().split()))
ans = 0
kazu =[]
kai = []
kitai2 = 0
for x in range(int(n) - (int(k)-1)):
    kazu = []
    for l in range(int(k)):
        if x+l < len(m):
           kazu.append(m[x+l])
    if ans < sum(kazu):
        ans = sum(kazu)
        kai = copy.deepcopy(kazu)

for j in range(int(k)):
    kitai = 0
    for g in range(kai[j]):
        kitai += g+1
    kitai2 += kitai / kai[j]
print(kitai2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

Buggy python submission (verdict: Runtime Error):
import copy
n, k = input().split()
m = list(map(int, input().split()))
ans = 0
kazu =[]
kai = []
kitai2 = 0
for x in range(int(n)):
    kazu = []
    for l in range(int(k) - (int(k)-1)):
        if x+l < len(m):
           kazu.append(m[x+l])
    if ans < sum(kazu):
        ans = sum(kazu)
        kai = copy.deepcopy(kazu)

for j in range(int(k)):
    kitai = 0
    for g in range(kai[j]):
        kitai += g+1
    kitai2 += kitai / kai[j]
print(kitai2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
import copy
n, k = input().split()
m = list(map(int, input().split()))
ans = 0
kazu =[]
kai = []
kitai2 = 0
for x in range(int(n)):
    kazu = []
    for l in range(int(k)):
        if x+l < len(m):
           kazu.append(m[x+l])
    if ans < sum(kazu):
        ans = sum(kazu)
        kai = copy.deepcopy(kazu)

for j in range(int(k)):
    kitai = 0
    for g in range(kai[j]):
        kitai += g+1
    kitai2 += kitai / kai[j]
print(kitai2)

Fixed submission:
N, K = map(int, input().split())
p = list(map(int, input().split()))

m = [(e + 1) / 2 for e in p]

t = sum(m[0:K])
result = t
for i in range(N - K):
    t -= m[i]
    t += m[i + K]
    if t > result:
        result = t
print(result)