Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))

for i in range(n):
    p_list[i] = (1 + p_list[i]) * 0.5

wa = sum(p_list[0:k])

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) * 0.5

for j in range(n-k+1):
    max_val = max(max_val, sum(p_list[j:j+k]))
        
print(max_val)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
max_val = 0
for i in range(n-k+1):
    max_val = max(max_val, sum(p_list[i:i+k]))
        
print((k + max_val) / 2)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
vals = []
for i in range(n-k+1):
    vals.append(sum(p_list[i:i+k]))
        
print((max(vals) + k )/2)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
vals = []
for i in range(n-k+1):
    vals.append(sum(p_list[i:i+k]))
        
print((max(vals) + k )/2)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
max_val = 0
vals = []
for i in range(n-k+1):
    val = sum(p_list[i:i+k])
    vals.append(val)
        
print((max(vals) + k )/2)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p_list = list(map(int, input().split()))
max_val = 0
for i in range(n-k+1):
    val = sum(p_list[i:i+k])
    if val > max_val:
        max_val = val
        kitai = (k + max_val) / 2
        
print(kitai)

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

for i in range(n):
    p_list[i] = (1 + p_list[i]) / 2

wa = sum(p_list[0:k])
ans = wa

for j in range(n-k):
    wa = wa + p_list[j+k] - p_list[j]
    ans = max(ans, wa)
    
print(ans)