Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
num = 0
maxnum = 0
for i in range(n-k+1):
    num = sum(p[i:i+k])
    if num > maxnum:
        maxnum = num
print("{:.6f}".format(0.5*(maxnum+k)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
num = 0
maxnum = 0
for i in range(n-k+1):
    num = 0.5*(sum(p[i:i+k])+k)
    if num > maxnum:
        maxnum = num
print("{:.6f}".format(maxnum))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Runtime Error):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
num = 0
maxnum = 0
for i in range(n-k+1):
    num = 0.5*(sum(p[i:i+k])+k)
    if num > maxnum:
        maxnum = num
print("{:.6f}".format(maxnum)

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import sys
input = sys.stdin.readline
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = [0]*(n-k+1)
for i in range(n-k+1):
    lstp[i] = (0.5*(sum(p[i:i+k])+k))
print("{:.6f}".format(max(lstp)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import sys
input = sys.stdin.readline
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(0.5*(sum(p[i:i+k])+k))
print("{:.6f}".format(max(lstp)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(0.5*(sum(p[i:i+k])+k))
print("{:.6f}".format(max(lstp)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(p[i:i+k])
#lstpp = []
#for j in lstp:
#    lstpp.append(0.5*(sum(j)+k))
lstpp = map(lambda x: 0.5*(sum(x)+k), lstp)
print("{:.10f}".format(max(lstpp)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(p[i:i+k])
lstpp = []
for j in lstp:
    lstpp.append(0.5*(sum(j)+k))
print("{:.10f}".format(max(lstpp)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(0.5*(sum(p[i:i+k])+k))
print("{:.10f}".format(max(lstp)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(p[i:i+k])
l = []
for ls in lstp:
    num = 0
    for j in range(k):
        num  += 0.5*(ls[j]+1)
    l.append(num)
print("{:.10f}".format(max(l)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(p[i:i+k])
l = []
for ls in lstp:
    num = 0
    for j in range(k):
        num  += 0.5*(ls[j]+1)
        l.append(num)
print("{:.10f}".format(max(l)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,k = map(int,input().split())
p = list(map(int,input().split()))
lstp = []
for i in range(n-k+1):
    lstp.append(p[i:i+k])
l = [0]*len(lstp)
for i in range(len(lstp)):
    for j in range(k):
        num  = 0.5*(lstp[i][j]+1)
        l[i] += num
print("{:.10f}".format(max(l)))

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
wa = sum(p[0:k])
next_wa = wa
for i in range(n-k):
    next_wa = next_wa - p[i] + p[i+k]
    if  next_wa > wa:
        wa = next_wa
print(0.5*(wa+k))