Buggy python submission (verdict: Runtime Error):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
ans = 0.0
SS = {sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}
kitaiti = {i : (i+1)/2 for i in range(1,1001)}
for i in SS[max(SS)]:
    ans += kitaiti[i]
print(ans)

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
ans = 0.0
SS = {sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}
for i in SS[max(SS)]:
     ans += (i/2*(i+1))/i
print(ans)

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Buggy python submission (verdict: Runtime Error):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
ki = [1+(0.5*(i-1)) for i in B]
print(max([sum(ki[i:i+A[1]]) for i in range(0,len(ki)-A[1])]))

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
print(sum([sum(i) for i in [[float(1/max({sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}.values())[i]*x) for x in list(range(1,max({sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}.values())[i]+1))] for i in range(len(max({sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}.values())))]]))

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
tes = 0.0
SS = {sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}
tes += sum([sum(i) for i in [[float(1/max(SS.values())[i]*x) for x in list(range(1,max(SS.values())[i]+1))] for i in range(len(max(SS.values())))]])
print(float(tes))

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A = list(map(int , input().split()))
B = list(map(int , input().split()))
tes = 0.0
SS = {sum(B[i:i+A[1]]):B[i:i+A[1]] for i in range(len(B)-A[1]+1)}
tes += sum([sum(i) for i in [[float(1/len(list(range(1,max(SS.values())[i]+1)))*x) for x in list(range(1,max(SS.values())[i]+1))] for i in range(len(max(SS.values())))]]) 
print(float(tes))

Fixed submission:
A = list(map(int , input().split()))
B = list(map(int , input().split()))
kitaiti =[(i+1)/2 for i in B]
ans = []
dd = [0]
for i in range(A[0]):
    dd.append(dd[i] + kitaiti[i])
for i in range(A[1] , A[0]+1):
    ans.append(dd[i] - dd[i - A[1]])
print(max(ans))