Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
import numpy as np
def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = np.asarray(list(map(int,input().split())))

    max_sum = 0
    listN = list(range(N))
    for i in listN:
        tmp_sum = np.sum(p_list[i:i+K])
        if(max_sum < tmp_sum):
            max_sum = tmp_sum
            ichi = i

    kitaichi = ((p+1)/2 for p in p_list[ichi:ichi+K])

    print(sum(kitaichi))

if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
from sys import stdin
import numpy as np
def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = np.asarray(list(map(int,input().split())))

    max_sum = 0
    listN = list(range(N))
    for i in listN:
        tmp_sum = np.sum(p_list[i:i+K])
        if(max_sum < tmp_sum):
            max_sum = tmp_sum
            ichi = i

    kitaichi = ((p+1)/2 for p in p_list[ichi:ichi+K])

    print(sum(kitaichi))

if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = tuple(map(int,input().split()))

    max_sum = 0
    listN = list(range(N))
    for i in listN:
        tmp_sum = sum(p_list[i:i+K])
        if(max_sum < tmp_sum):
            max_sum = tmp_sum
            ichi = i

    kitaichi = ((p+1)/2 for p in p_list[ichi:ichi+K])

    print(sum(kitaichi))

if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = tuple(map(int,input().split()))

    max_sum = 0
    listN = list(range(N))
    for i in listN:
        tmp_sum = sum(p_list[i:i+K])
        if(max_sum < tmp_sum):
            max_sum = tmp_sum
            ichi = i

    kitaichi = ((p+1)/2 for p in p_list[ichi:ichi+K])

    print(sum(kitaichi))

if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

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

def main():
    input = sys.stdin.readline

    N,K = map(int,input().split())
    p_list = tuple(map(int,input().split()))

    max_sum = 0
    for i in range(N):
        tmp_sum = sum(p_list[i:i+K])
        if(max_sum < tmp_sum):
            max_sum = tmp_sum
            ichi = i

    kitaichi = ((p+1)/2 for p in p_list[ichi:ichi+K])

    print(sum(kitaichi))

if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

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

def main():
    input = sys.stdin.readline

    N,K = map(int,input().split())
    p_list = tuple(map(int,input().split()))

    max_sum = 0
    for i in range(N):
        tmp_sum = sum(p_list[i:i+K])
        if(max_sum < tmp_sum):
            max_sum = tmp_sum
            ichi = i

    kitaichi = ((p+1)/2 for p in p_list[ichi:ichi+K])

    print(sum(kitaichi))

if __name__ == "__main__":
    main()

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

N,K = map(int,input().split())
p_list = list(map(int,input().split()))

# kitaichi_p_list = [(p + 1)/2 for p in p_list]

max_sum = 0
for i in range(N):
    tmp_sum = sum(p_list[i:i+K])
    if(max_sum < tmp_sum):
        max_sum = tmp_sum
        ichi = i

kitaichi = [(p+1)/2 for p in p_list[ichi:ichi+K]]

print(sum(kitaichi))

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
p_list = list(map(int,input().split()))

# kitaichi_p_list = [(p + 1)/2 for p in p_list]

max_sum = 0
for i in range(N):
    tmp_sum = sum(p_list[i:i+K])
    if(max_sum < tmp_sum):
        max_sum = tmp_sum
        ichi = i

kitaichi = [(p+1)/2 for p in p_list[ichi:ichi+K]]

print(sum(kitaichi))

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
p_list = list(map(int,input().split()))

kitaichi_p_list = [(p + 1)/2 for p in p_list]

max_kitaichi = 0
for i in range(N):
    kitaichi = sum(kitaichi_p_list[i:i+K])
    if(max_kitaichi < kitaichi):
        max_kitaichi = kitaichi

print(max_kitaichi)

Fixed submission:
from sys import stdin

def main():

    input = stdin.readline

    N,K = map(int,input().split())
    p_list = [(p+1)/2 for p in list(map(int,input().split()))]

    # Sを計算
    S = [0]
    for p in p_list:
        S.append(S[-1] + p)
        # print(S)

    # i:i+kを計算

    maxs = 0
    for i in range(N-K+1):
        p_num = S[i+K] - S[i]
        if(maxs < p_num):
            maxs = p_num
    
    print(maxs)

if __name__ == "__main__":
    main()