Buggy python submission (verdict: Runtime Error):
import itertools　#pythonで累積和を使うときはitertoolsというライブラリのaccumulateを使う
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = list(itertools.accumulate([x for x in p])) #累積和の計算


#pの中から隣り合う（ｋ個）の和が最大のときの値は？（今回は２＋４＋５＝１１）　ｋ個離れたaccの差が最大なところ
ans=max(acc[i]-acc[i-k] for i in range(k-1,n))
answer=ans/2+k/2


Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
	sump=p[i]+p[i+1]+p[i+2]
	if sump>sump0:
	sump0=sump
    
print(sump0/2+K/2)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
	sump=p[i]+p[i+1]+p[i+2]
	if sump>sump0:
	sum0=sump
    
print(sum0/2+K/2)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
 
  sump=p[i]+p[i+1]+p[i+2]
  if sump>sump0:
		sum0=sump
    
print(sum0/2+K/2)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
sump0=0
for i in range(N-2):
 
  sump=p[i]+p[i+1]+p[i+2]
  if sump>sump0:
    sum0=sump
    
print(sum0/2+K/2)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
p = list(map(int, input().split()))
 
for i in range(N-2):
  sump0=0
  sump=p[i]+p[i+1]+p[i+2]
  if sump>smp0:
    sum0=sump
    
print(sum0/2+K/2)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)

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

for i in range(n-2):
  sump0=0
  sump=p[i]+p[i+1]+p[i+2]
  if sump>smp0:
    sum0=sump
    
print(sum0/2+k/2)

Fixed submission:
import itertools
 
n, k = map(int, input().split())
p = list(map(int, input().split()))
acc = [0] + list(itertools.accumulate([(x+1)/2 for x in p])) # 累積和を計算
 
ans = max(acc[i]-acc[i-k] for i in range(k, n+1)) # k番目からn番目まで計算
print(ans)