Buggy python submission (verdict: Time Limit Exceeded):
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]
max_sum = 0

for i in range(all_num - (select_num - 1)):
    if i == 0 or dice[i + select_num -1] > dice[i - 1]:
        this_sum = sum(dice[i:(i + select_num)])
        if this_sum > max_sum:
            max_sum = this_sum
    else:
        pass

print((max_sum + select_num) * 0.5)

Fixed submission:
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]

for i in range(all_num - (select_num - 1)):
    if i == 0:
        max_sum = this_sum = sum(dice[i:(i + select_num)])
    else:
        this_sum = this_sum - dice[i - 1] + dice[i + select_num - 1]

        if this_sum > max_sum:
            max_sum = this_sum

print((max_sum + select_num) * 0.5)

Buggy python submission (verdict: Time Limit Exceeded):
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]
max_sum = 0

for i in range(all_num - (select_num - 1)):
    this_sum = sum(dice[i:(i + select_num)])
 
    if this_sum > max_sum:
        max_sum = this_sum

print((max_sum + select_num) * 0.5)

Fixed submission:
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]

for i in range(all_num - (select_num - 1)):
    if i == 0:
        max_sum = this_sum = sum(dice[i:(i + select_num)])
    else:
        this_sum = this_sum - dice[i - 1] + dice[i + select_num - 1]

        if this_sum > max_sum:
            max_sum = this_sum

print((max_sum + select_num) * 0.5)

Buggy python submission (verdict: Time Limit Exceeded):
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]
max_sum = 0

for i in range(all_num - (select_num - 1)):
    #this_sum = 0
    select_list = []
    for s in range(select_num):
        #this_sum += dice[i+s]
        select_list.append(dice[i+s])

    this_sum = sum(select_list)
 
    if this_sum > max_sum:
        max_sum = this_sum

print((max_sum + select_num) * 0.5)

Fixed submission:
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]

for i in range(all_num - (select_num - 1)):
    if i == 0:
        max_sum = this_sum = sum(dice[i:(i + select_num)])
    else:
        this_sum = this_sum - dice[i - 1] + dice[i + select_num - 1]

        if this_sum > max_sum:
            max_sum = this_sum

print((max_sum + select_num) * 0.5)

Buggy python submission (verdict: Time Limit Exceeded):
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]
max_sum = 0

for i in range(all_num - (select_num - 1)):
    this_sum = 0
    for s in range(select_num):
        this_sum += dice[i+s]
 
    if this_sum > max_sum:
        max_sum = this_sum

print((max_sum + select_num) * 0.5)

Fixed submission:
all_num, select_num = map(int, input().split())
dice = [int(a) for a in input().split()]

for i in range(all_num - (select_num - 1)):
    if i == 0:
        max_sum = this_sum = sum(dice[i:(i + select_num)])
    else:
        this_sum = this_sum - dice[i - 1] + dice[i + select_num - 1]

        if this_sum > max_sum:
            max_sum = this_sum

print((max_sum + select_num) * 0.5)