Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
for i in range(0, len(m)):
    m[i] = int(m[i])
a = m[0]
b = m[1]
m = m[2:]
p = 0
for i in range(a-b,a):
    p = p + int(m[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)

Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
for i in range(0, len(m)):
    m[i] = int(m[i])
a = m[0]
b = m[1]
m = m[2:]

p = 0
for i in range(a-b,a):
    p = p + int(c[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)

Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
a 

for i in range(0, len(m)):
    m[i] = int(m[i])
a = m[0]
b = m[1]
m = m[2:]
print(m,a,b)

p = 0
for i in range(a-b,a):
    p = p + int(c[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)

Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
print(m)
a = [input() for l in range(0,1)]
b = a[0].split()
print(b)

for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)
print(c)
p = 0
for i in range(int(m[0]) - int(m[1])+1,int(m[0])+1):
    p = p + int(c[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)

Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
l = m[2:]
s = sorted(l, reverse=True)
p = 0
for i in range(0,int(m[1])):
    p = p + int(l[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)

Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
l = m[2:]
a = sorted(l, reverse=True)
p = 0
for i in range(0,int(m[1])):
    p = p + int(c[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)

Buggy python submission (verdict: Runtime Error):
n = input()
m = n.split()
print(m)
l = m[2:]
a = sorted(l, reverse=True)
p = 0
for i in range(0,int(m[1])):
    p = p + int(c[i])
print(int(p))

Fixed submission:
n = input()
m = n.split()
a = [input() for l in range(0,1)]
b = a[0].split()
for i in range(0, len(b)):
    b[i] = int(b[i])
c = sorted(b, reverse=True)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(p)