Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

l = sum(pn[:K])
for i in range(N-K+1):
    l = max(l, l+pn[K+i]-pn[i])
ans = (l+K)/2
print(ans)


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

l = sum(pn[:K])
for i in range(N-K+1):
    l = max(l, l+pn[K+1+i]-pn[i])
ans = (l+K)/2
print(ans)


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

l = pn[:K]
for i in range(N-K+1):
    l = max(l, l+pn[K+1+i]-pn[i])
ans = (l+K)/2
print(ans)


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

l = pn[:K]
for i in range(N-K+1):
    l = max(l, l+pn[K+1]-pn[i])
ans = (l+K)/2
print(ans)

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline


def main():
    N, K = map(int, input().split())
    pn = list(map(int, input().split()))

    a = 0
    for i in range(N-K+1):
        p = pn[i:i+K]
        a = max(a, sum(p))

    ans = (a+K)/2
    print(ans)

if __name__ == '__main__':
    main()

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline


def main():
    N, K = map(int, input().rstrip().split())
    pn = list(map(int, input().rstrip().split()))

    a = 0
    for i in range(N-K+1):
        p = pn[i:i+K]
        a = max(a, sum(p))

    ans = (a+K)/2
    print(ans)

if __name__ == '__main__':
    main()

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

list = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    list = max(list, sum(p))

ans = (list+K)/2
print(ans)


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

list = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    list = max(list, sum(p))

ans = (list+K)/2
print(ans)

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

list = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    list = max(list, sum(p))

ans = (list+K)/2
print('{:.6f}'.format(ans))


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))
 
maxlist = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    maxlist = max(maxlist, sum(p))
 
ans = (maxlist+K)/2
print('{:.12f}'.format(ans))

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

maxlist = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    maxlist = max(maxlist, sum(p))

ans = (maxlist+K)/2
print('{:.12f}'.format(ans))


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))

ans = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    if ans < sum(p):
        maxlist = p
        ans = sum(p)

ans = (sum(maxlist)+int(len(maxlist)))/2
print('{:.12f}'.format(ans))



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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))


def ex(list):
    ans = 0
    for i in list:
        ans += (i+1)/2
    return(float(ans))


ans = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    if ans < sum(p):
        maxlist = p
        ans = sum(p)

print('{:.12f}'.format(ex(maxlist)))


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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))


def ex(list):
    ans = 0
    for i in list:
        ans += (i+1)/2
    return(float(ans))


ans = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    if ans < sum(p):
        maxlist = p
        ans = sum(p)

print('{:.12f}'.format(ex(maxlist)))

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
pn = list(map(int, input().split()))


def ex(list):
    ans = 0
    for i in list:
        ans += (i+1)/2
    return(float(ans))


ans = 0
for i in range(N-K+1):
    p = pn[i:i+K]
    ans = max(ans, ex(p))

print('{:.12f}'.format(ans))

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)