Buggy python submission (verdict: Time Limit Exceeded):
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)

ex =0
ext = []
ext2 = []
for f in range(n):
    xs = list(range(1,int(p[f])+1))
    xs = sum(xs)*1/int(p[f])
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))

Fixed submission:
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
#p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    pi = int(p[f])
    xs =(pi+1)/2
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))

Buggy python submission (verdict: Time Limit Exceeded):
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    xs = list(range(1,p[f]+1))
    xs = sum(xs)*1/p[f]
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))

Fixed submission:
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
#p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    pi = int(p[f])
    xs =(pi+1)/2
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))

Buggy python submission (verdict: Time Limit Exceeded):
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
p = [int(s) for s in p]

#print(p)

ex =0
ext = []
for f in range(n):
    xs = list(range(1,p[f]+1))
    #print(n,f, p[f],xs,sum(xs))
    xs = [s*1/p[f] for s in xs]
    #print(sum(xs))
    ext.append(sum(xs))
    #print(ext)
    
for i in range(n-k+1):

    txs = [ext[g] for g in range(i,i+k)]
    if sum(txs) > ex: ex = sum(txs)
print('{:.12f}'.format(ex))


Fixed submission:
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
#p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    pi = int(p[f])
    xs =(pi+1)/2
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))

Buggy python submission (verdict: Time Limit Exceeded):
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
p = [int(s) for s in p]

#print(p)

ex =0
xs=[]

for i in range(n-k+1):
    ext = 0
    for f in range(k):
        xs = list(range(1,p[i+f]+1))
        #print(i,f, p[i+f],xs,sum(xs))
        xs = [s*1/p[i+f] for s in xs]
        #print(xs)
        ext +=sum(xs)
        #print(ext)
        
    if ext>ex:
        ex = ext
print('{:.12f}'.format(ex))

Fixed submission:
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
#p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    pi = int(p[f])
    xs =(pi+1)/2
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))

Buggy python submission (verdict: Runtime Error):
s =0

print(n,a)

for f in range(n):
  
  for g in range(n):

    if g != f:
    	if a[f] == a[g]:
      		#print(a[f], a[g])
      		s = s+1
      
if s>0: print("NO")
else: print('YES')

Fixed submission:
import math

n,k = input().split()
p = input().split()

n = int(n)
k = int(k)
#p = [int(s) for s in p]

#print(p)

ex =0
ext = []
ext2 = []
for f in range(n):
    pi = int(p[f])
    xs =(pi+1)/2
    ext.append(xs)

ext2.append(ext[0])
for i in range(1,n):
    ext2.append(ext2[i-1]+ext[i])

ex = ext2[k-1]
for j in range(1,n-k+1):
    ext3 =ext2[j+k-1]-ext2[j-1]
    if ext3 > ex: ex = ext3

print('{:.12f}'.format(ex))