Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
for i in range(a - b + 1):
	f = sum(d[i:b + i])
	if f > e:
		e = f
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = [sum(d[i:b + i]) for i in range(a - b + 1)]
print(max(e))

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(c[i] + 1)/ 2 for i in range(a)]
e = [sum(d[i:b + i]) for i in range(a - b + 1)]
g = max(e)
print(g)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(sum(range(1, c[i] + 1)) / c[i]) for i in range(a)]
e = [sum(d[i:b + i]) for i in range(a - b + 1)]
print(max(e))

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [sum(c[i:b + i]) for i in range(a - b + 1)]
e = 0
g = d.index(max(d))
for i in range(b):
	e += sum(range(1, c[g + i] + 1)) / c[g + i]
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [sum(c[i:b + i]) for i in range(a - b + 1)]
e = 0
g = d.index(max(d))
for i in range(b):
	f = sum(range(1, c[g + i] + 1))
	e += f / c[g + i]
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = []
h = 0
for i in range(a - b + 1):
	h = sum(c[i:b + i])
	d.append(h)
e = 0
f = 0
g = d.index(max(d))
for i in range(b):
	f = sum(range(1, c[g + i] + 1))
	e += f / c[g + i]
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = []
for i in range(a - b + 1):
	h = 0
	h = sum(c[i:k + i])
	d.append(h)
e = 0
f = 0
g = d.index(max(d))
for i in range(b):
	f = sum(range(1, c[g + i] + 1))
	e += f / c[g + i]
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = []
for i in range(a - b + 1):
	h = 0
	for j in range(b):
		h += c[i + j]
	d.append(h)
e = 0
g = d.index(max(d))
for i in range(b):
	f = c[i + g]
	d = 0
	for j in range(f):
		d += (j + 1)
	e += d / f
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = input().split()
d = []
for i in range(a - b + 1):
	h = 0
	for j in range(b):
		h += int(c[i + j])
	d.append(h)
e = 0
g = d.index(max(d))
for i in range(b):
	f = int(c[i + g])
	d = 0
	for j in range(f):
		d += (j + 1)
	e += d / f
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = input().split()
e = 0
for i in range(b):
	f = int(c[i + b - 1])
	d = 0
	for j in range(f):
		d += (j + 1)
	e += d / f
print(e)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
c = list(map(int, input().split()))
d = [(i + 1) / 2 for i in c]
e = sum(d[:b])
f = e
for i in range(a - b):
	f -= d[i]
	f += d[i + b]
	if f > e:
		e = f
print(e)