Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

input_hp.sort(reverse=True)
try:
    [input_hp.pop(_) for _ in range(input_line[1])]
    print(sum(input_hp))
except IndexError:
    print(‘0’)

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))
try:
    [(input_hp.sort(reverse=True) ,input_hp.pop(_)) for _ in range(input_line[1])]
    print(sum(input_hp))
except IndexError:
    print(‘0’)

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

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

input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))
try:
    [(input_hp.sort(reverse=True) ,input_hp.pop(_)) for _ in range(input_line[1])]
    print(sum(input_hp))
except IndexError:
    print('0')

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

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

input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    [(input_hp.sort(reverse=True) ,input_hp.pop(_)) for _ in range(input_line[1])]
    print(sum(input_hp))

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

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

input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    [(input_hp.sort(reverse=True) ,input_hp.pop(i)) for i in range(input_line[1])]
    print(sum(input_hp))

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

Buggy python submission (verdict: Time Limit Exceeded):
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    [(input_hp.sort(reverse=True) ,input_hp.pop(i)) for i in range(input_line[1])]
    print(sum(input_hp))

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

Buggy python submission (verdict: Time Limit Exceeded):
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    [input_hp.sort(reverse=True) for i in range(input_line[1])]
    [input_hp.pop(i) for i in range(input_line[1])]
    print(sum(input_hp))

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

Buggy python submission (verdict: Time Limit Exceeded):
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    for i in range(input_line[1]):
        input_hp.sort(reverse=True)
        input_hp.pop(i)
    result = sum(input_hp)
    print(result)

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)

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

input_hp = list(map(int,input().split()))

input_hp.sort(reverse=True)

tec_count = input_line[1]

if input_line[0] <= input_line[1]:
    print('0')
else:
    for i in range(tec_count):
        input_hp.pop(i)
    result = sum(input_hp)
    print(result)

Fixed submission:
input_line = list(map(int,input().split()))
input_hp = list(map(int,input().split()))

if input_line[0] <= input_line[1]:
    print('0')
else:
    input_hp.sort()
    result_input_hp = len(input_hp) - input_line[1]
    sum_total = sum(input_hp[:result_input_hp])
    print(sum_total)