Buggy python submission (verdict: Runtime Error):
import numpy as np
N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])

#e=np.cumsum(n)
#print(e)
#print(e[K:],e[:-K],e[K:]-e[:-K])


max=0
for i in range(N-K+1):
    tmp = np.sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 

print((max+K)*0.5)

Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N,K = [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
n=np.array(n)
max=0
for i in range(N-K+1):
    tmp = np.sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 

print((max+K)*0.5)

Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
max=0
for i in range(N-K+1):
    tmp = sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 

print((max+K)*0.5)


Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
max=0
idx=0
for i in range(N-K+1):
    tmp = sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 
        idx=i

d=n[idx:idx+K]

print((sum(d)+K)*0.5)


Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N,K = [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
max=0
idx=0
for i in range(N-K+1):
    tmp = sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 
        idx=i

d=n[idx:idx+K]
tmp=0
for i in range(K):
    tmp += np.sum(np.arange(1,d[i]+1))/d[i]
print(tmp)

Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Runtime Error):
N,K = [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
max=0
idx=0
for i in range(N-K+1):
    tmp = sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 
        idx=i

tmp=0
for i in range(K):
    tmp += sum(range(1,d[i]+1))/d[i]
print(tmp)

Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = [int(i) for i in input().split()]
n = [int(i) for i in input().split()]
max=0
idx=0
for i in range(N-K+1):
    tmp = sum(n[i:i+K]) 
    if tmp  > max:
        max=tmp 
        idx=i

d=sorted(n[idx:idx+K])
e=[0]*K
tmp=0
for i in range(K):
    tmp += sum(range(1,d[i]+1))/d[i]
print(tmp)

Fixed submission:
import numpy as np

N,K = [int(i) for i in input().split()]
n = np.array([int(i) for i in input().split()])
n=(n+1)
t=np.empty(N+1)
t[0] = 0
t[1:]=np.cumsum(n)
print(max(t[K:]-t[:-K])*0.5)