Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))

ans = 0

for i in range(n-k+1):
    ans = max(ans, sum(p[i:i+k]))

print((ans+k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))

ans = 0

for i in range(n-k+1):
    ans = max(ans, sum(p[i:i+k]))

print((ans+k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))
m = 0

for i in range(n-k+1):
    t = sum(p[i:i+k])
    if t > m:
        m = t

print((m+k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))
l = []

for i in range(n-k+1):
    a = sum(p[i:i+k])
    l.append(a)

print((max(l) + k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))
l = []

for i in range(n-k+1):
    a = sum(p[i:i+k])
    l.append(a)

print((max(l) + k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = [int(x) for x in input().split()]
highest = 0

for i in range(n-k+1):
    a = sum(p[i:i+k])
    if a > highest:
        highest = a

print((highest + k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))
highest = 0

for i in range(n-k+1):
    a = sum(p[i:i+k])
    if a > highest:
        highest = a

print((highest + k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int, input().split()))
highest = 0

for i in range(n-k+1):
    a = sum(p[i:i+k])
    if a > highest:
        highest = a

print((highest + k)/2)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))

a= sum(p[0:k])
ans = a

for i in range(n-k):
    a -= p[i]
    a += p[i+k]
    ans = max(ans,a)

print((ans+k)/2)