Buggy python submission (verdict: Time Limit Exceeded):
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	for k in range(1,N-K+1):
		if T<=sum(P[k:k+K]):
			T=sum(P[k:k+K])
	print((T+K)/2)


Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	for k in range(1,N-K+1):
		if T<=sum(P[k:k+K]):
			T=sum(P[k:k+K])
	print((T+K)/2)

Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
S=[]
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	for k in range(1,N+1):
		S.append(sum(P[0:k]))
	T=S[K-1]
	for n in range(0,N-K):
		if T<=S[n+K]-S[n]:
			T=S[n+K]-S[n]

	print((T+K)/2)


Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
S=[]
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	for k in range(1,N+1):
		S.append(sum(P[0:k]))
	T=[S[K-1]]
	for n in range(0,N-K):
		T.append(S[n+K]-S[n])
	print((max(T)+K)/2)


Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
A=[0]
if K!=1:
  for k in range(0,N-K+1):
    On=0
    for l in range(0,K):
      On+=P[k+l]
    A.append(On)
  print((max(A)+K)/2)
elif K==N:
  print((sum(P)+N)/2)
else:
  print((max(P)+1)/2)

Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
A=[0]
if K!=1:
  for k in range(0,N-K+1):
    On=0
    for l in range(0,K):
      On+=P[k+l]
    A.append(On)
  print((max(A)+K)/2)
else:
  print((max(P)+1)/2)


Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
A=[0]
for k in range(0,N-K+1):
  On=0
  for l in range(0,K):
    On+=P[k+l]
  A.append(On)

print((max(A)+K)/2)

Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
A=[0]
for k in range(0,N-K+1):
  On=0
  for l in range(0,K):
    On+=P[k+l]
    A.append(On)

print((max(A)+K)/2)

Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
P=list(map(int,input().split()))
Kitai=[0]
for k in range(0,N-K+1):
  On=0
  for l in range(0,K):
    On+=(1+P[k+l])/2
  Kitai.append(On)

print(max(Kitai))

Fixed submission:
#模範解答の通りにやってみる
N,K=map(int,input().split())
P=list(map(int,input().split()))
if K==1:
	print((max(P)+1)/2)
elif N==K:
	print((sum(P)+N)/2)
else:
	T=sum(P[0:(K)])
	S=sum(P[0:(K)])
	for k in range(0,N-K):
		S=S-P[k]+P[k+K]
		if T<=S:
			T=S
		else:
			continue
	print((T+K)/2)