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

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = l[:k]
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = l[:k]
now = tmp
 
for i in range(n-k+1):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

n, k = map(int, input().split())
l = deque(list(map(int, input().split())))
d = deque()

for _ in range(k):
  d.append(l.popleft())
now = sum(d)  
for i in range(n-k):
  d.popleft()
  d.append(l.popleft())
  now = max(sum(d), now)
  
print((now + k) / 2)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

n, k = map(int, input().split())
l = deque(list(map(int, input().split())))
d = deque()

for _ in range(k):
  d.append(l.popleft())
now = sum(d)  
for i in range(n-k):
  d.popleft()
  d.append(l.popleft())
  now = max(sum(d), now)
  
print((now + k) / 2)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

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

now = 0

for i in range(n-k+1):
  now = max(sum(l[i:i+k]), now)
  
print((now + k) / 2)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)

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

now = 0

for i in range(n-k+1):
  now = max(sum(l[i:i+k]), now)
  
print((now + k) / 2)

Fixed submission:
n, k = map(int, input().split())
l = list(map(int, input().split()))
 
tmp = sum(l[:k])
now = tmp
 
for i in range(n-k):
  tmp -= l[i]
  tmp += l[i+k]
  now = max(tmp, now)
  
print((now + k) / 2)