Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
for a,b in zip(A,B):
    if b>a:
        need+=b-a
        Ans+=1

Gap=[a-b for a,b in zip(A,B)]
Gap.sort(reverse=True)
index=0
while need>0 and Ans+index<=N:
    need-=Gap[index]
    index+=1
    
if Ans+index<=N:
    print Ans+index
else:
    print "-1"

Fixed submission:
N=input()
A=map(int,raw_input().split())
B=map(int,raw_input().split())
need=0
Ans=0

for a,b in zip(A,B):
    if b>a:
        need+=b-a
        Ans+=1
        
index=0

Gap=[a-b for a,b in zip(A,B)]
Gap.sort(reverse=True)

while need>0:
    if Ans+index>=N:
        break
    need-=Gap[index]
    index+=1
    
if need<=0:
    print Ans+index
else:
    print "-1"

Buggy python submission (verdict: Time Limit Exceeded):
N=input()
A=map(int,raw_input().split())
B=map(int,raw_input().split())
unmatch=[]
need=0

for i in range(N):
    if A[i]<B[i]:
        unmatch.append(i)
        need+=B[i]-A[i]

Gap=[A[i]-B[i] for i in range(N) if i not in unmatch]
Gap.sort(reverse=True)
Ans=len(unmatch)

while need>0:
    if Ans>=N:
        print "-1"
        exit()
    need-=Gap[Ans-len(unmatch)]
    Ans+=1
print Ans

Fixed submission:
N=input()
A=map(int,raw_input().split())
B=map(int,raw_input().split())
need=0
Ans=0

for a,b in zip(A,B):
    if b>a:
        need+=b-a
        Ans+=1
        
index=0

Gap=[a-b for a,b in zip(A,B)]
Gap.sort(reverse=True)

while need>0:
    if Ans+index>=N:
        break
    need-=Gap[index]
    index+=1
    
if need<=0:
    print Ans+index
else:
    print "-1"

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N=input()
A=np.array(map(int,raw_input().split()))
B=map(int,raw_input().split())



B2=[[b,i,A[i]] for i,b in enumerate(B)]
B2.sort(reverse=True)
used=[]
gap=0
Ans=0
for b in B2:
    if b[1] not in used and A[b[1]]+gap>=b[0]:
        used.append(b[1])
        if b[0]>A[b[1]]:
            Ans+=1
            gap-=max(0,b[0]-A[b[1]])
    else:
        koho=np.where(A>=b[0])[0]
        koho=list(set(koho)-set(used))
        if len(koho)==0:
            print "-1"
            exit()
        koho_B=np.array([B[k] for k in koho])
        used.append(koho[koho_B.argmin()])
        gap+=A[koho[koho_B.argmin()]]-b[0]
        B[b[1]]=0
        Ans+=1
print Ans

Fixed submission:
N=input()
A=map(int,raw_input().split())
B=map(int,raw_input().split())
need=0
Ans=0

for a,b in zip(A,B):
    if b>a:
        need+=b-a
        Ans+=1
        
index=0

Gap=[a-b for a,b in zip(A,B)]
Gap.sort(reverse=True)

while need>0:
    if Ans+index>=N:
        break
    need-=Gap[index]
    index+=1
    
if need<=0:
    print Ans+index
else:
    print "-1"
Buggy python submission (verdict: Runtime Error):
N,P=map(int,raw_input().split())

import sympy

Soin=sympy.factorint(P)
Soin_s=sorted(Soin.items(), key=lambda x: x[1])
Ans=1
for s_s in Soin_s:
    if s_s[1]>=N:
        Ans=Ans*(s_s[0]**(s_s[1]/N))
print Ans

Fixed submission:
import collections
N,P=map(int,raw_input().split())

Soin=[]
for i in range(2,int(P**0.5)+1):
    while P%i==0:
        P=P/i
        Soin.append(i)
if P!=1:
    Soin.append(P)

Soin_s=collections.Counter(Soin)

Ans=1
for s in Soin_s:
    if Soin_s[s]>=N:
        Ans=Ans*(s**(Soin_s[s]/N))
print Ans
Buggy python submission (verdict: Time Limit Exceeded):
H,W,N=map(int,raw_input().split())
XY=[]
for i in range(N):
    XY.append(map(int,raw_input().split()))

XY.sort()

conditions=[i-1 for i in range(H+1)]
for xy in XY:
    if conditions[xy[0]]>=xy[1]:
        print xy[0]-1
        break
    if xy[1]==conditions[xy[0]]+1:
        conditions=[conditions[i] if i<=xy[0] \
                   else conditions[i]-1 for i in range(H+1)]
 
else:
    print H

Fixed submission:
H,W,N=map(int,raw_input().split())
XY=[]
for i in range(N):
    XY.append(map(int,raw_input().split()))

XY.sort()

conditions=[2,1]
for xy in XY:
    if xy[0]>conditions[0]:
        conditions=[xy[0],conditions[1]+xy[0]-conditions[0]]
    if conditions[1]>=xy[1]:
        print xy[0]-1
        break
    if xy[1]==conditions[1]+1:
        conditions=[conditions[0],conditions[1]-1]
else:
    print H

Buggy python submission (verdict: Time Limit Exceeded):
H,W,N=map(int,raw_input().split())
XY=[]
for i in range(N):
    XY.append(map(int,raw_input().split()))

XY.sort()

conditions=[i-1 for i in range(H+1)]
for xy in XY:
    if xy[1]==conditions[xy[0]]+1:
        conditions=[conditions[i] if i<=xy[0] \
                   else conditions[i]-1 for i in range(H+1)]

for xy in XY:
    if conditions[xy[0]]>=xy[1]:
        print xy[0]-1
        break
else:
    print H

Fixed submission:
H,W,N=map(int,raw_input().split())
XY=[]
for i in range(N):
    XY.append(map(int,raw_input().split()))

XY.sort()

conditions=[2,1]
for xy in XY:
    if xy[0]>conditions[0]:
        conditions=[xy[0],conditions[1]+xy[0]-conditions[0]]
    if conditions[1]>=xy[1]:
        print xy[0]-1
        break
    if xy[1]==conditions[1]+1:
        conditions=[conditions[0],conditions[1]-1]
else:
    print H
Buggy python submission (verdict: Runtime Error):
N=input()

import sympy
import math
import numpy as np
a=sympy.factorint(math.factorial(N))

a=np.array([a for a in a.values()])

print len(np.where(a>=74)[0])\
        +len(np.where(a>=24)[0])*(len(np.where(a>=2)[0])-1)\
        +len(np.where(a>=14)[0])*(len(np.where(a>=4)[0])-1)\
        +(len(np.where(a>=4)[0])*(len(np.where(a>=4)[0])-1)*(len(np.where(a>=2)[0])-2))/2

Fixed submission:
N=input()
Ans=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 8, 8, 11, 11, 11, 11, 14, 14, 32, 32, 35, 35, 35, 35, 42, 42, 42, 42, 49, 49, 49, 49, 49, 49, 75, 75, 86, 86, 86, 86, 86, 86, 123, 123, 131, 131, 131, 131, 148, 148, 153, 153, 170, 170, 170, 170, 170, 170, 227, 227, 227, 227, 227, 227, 250, 250, 323, 323, 324, 324, 324, 324, 354, 354, 354, 354, 384, 384, 384, 384, 384, 391, 491, 491, 529, 529, 529, 529, 529, 529, 543]

print Ans[N]
Buggy python submission (verdict: Runtime Error):
N=input()
T,A=map(int,raw_input().split())
H=map(int,raw_input().split())

temp=[[abs(T-H[i]*0.006-A),i+1] for i in range(N)]
temp.sort()
print temp[0][2]


Fixed submission:
N=input()
T,A=map(int,raw_input().split())
H=map(int,raw_input().split())

temp=[[abs(T-H[i]*0.006-A),i+1] for i in range(N)]
temp.sort()
print temp[0][1]
Buggy python submission (verdict: Time Limit Exceeded):
H,W,K=map(int,raw_input().split())

fibo=[1,1,2]
for i in range(W):
    fibo.append(fibo[-1]+fibo[-2])

mod=1000000007
    
def f(H,K):
    if H==0:
        if K==1:
            return 1
        else:
            return 0
    else:
        if K==0 or K==W+1:
            return 0
        else:
            return (f(H-1,K)*fibo[K-1]*fibo[W-K]\
                    +f(H-1,K-1)*fibo[K-2]*fibo[W-K]\
                    +f(H-1,K+1)*fibo[K-1]*fibo[W-K-1])%mod
            
print f(H,K)

Fixed submission:
H,W,K=map(int,raw_input().split())

fibo=[1,1,2]
for i in range(W):
    fibo.append(fibo[-1]+fibo[-2])

mod=1000000007
    
f=[[1 if i==1 else 0 for i in range(W+2)]]
for i in range(H):
    for j in range(W):
        f.append([(f[-1][j]*fibo[j-1]*fibo[W-j]+f[-1][j-1]*fibo[j-2]*fibo[W-j]\
                  +f[-1][j+1]*fibo[j-1]*fibo[W-j-1])% mod\
                     if (j>=1 and j<=W) else 0 for j in range(W+2)])     

print f[H][K]
Buggy python submission (verdict: Runtime Error):
import sys

l = []
for line in sys.stdin:
  l.append([int(i) for i in line.split()])

a, b, c = l
if b >= a * c:
  print(c)
else:
  print(b//a)
         

Fixed submission:
import sys
 
l = []
for line in sys.stdin:
  l.append([int(i) for i in line.split()])
 
a, b, c = l[0]
if b >= a * c:
  print(c)
else:
  print(b//a)
Buggy python submission (verdict: Runtime Error):
import sys

v = []
for line in sys.stdin:
    v = [i for i in line.split()]

m = 0
for a, b in v[1:]:
  a = float(a)
  if b == "JPY":
    m += a
  else:
    m += 380000.0 * a
print(m)

Fixed submission:
import sys
 
v = []
for line in sys.stdin:
    v.append([i for i in line.split()])
 
m = 0
for a, b in v[1:]:
  a = float(a)
  if b == "JPY":
    m += a
  else:
    m += 380000.0 * a
print(m)
Buggy python submission (verdict: Runtime Error):
import sys

v = []
for line in sys.stdin:
  v.append(int(line))

if v[1] % v[0] == 0:
  print(v[1] + v[0])
else:
  print(v[0] - v[1])

Fixed submission:
import sys

v = []
for line in sys.stdin:
  v = [int(l) for l in line.split()]

if v[1] % v[0] == 0:
  print(v[0] + v[1])
else:
  print(v[1] - v[0])
Buggy python submission (verdict: Runtime Error):
import sys

v = []
for line in sys.stdin:
  v.append([int(l) for l in line.split()])

n, m = v[0]
min_k = -1
min_idx = -1
for idx, line in enumerate(v[1:]):
  if min_k == -1 or min_k > line[0]:
    min_k = line[0]
    min_idx = idx + 1

count = 0
min_v = line[min_idx, 1:]
for min_v_v in min_v:
	if n == sum(min_v_v in v[1:,1:]):
      count+=1
print(count)

Fixed submission:
import sys

v = []
for line in sys.stdin:
    v.append([int(l) for l in line.split()])

n = v[0][0]
m = v[0][1]

a = None
for line in v[1:]:
  if a == None:
    a = line[1:]
  else:
    c = []
    for b in a:
      if b in line[1:]:
        c.append(b)
    a = c
print(len(a))
Buggy python submission (verdict: Runtime Error):
from fractions import *

def lcm(a,b): 
    return int(abs(a * b) / gcd(a,b) if a and b else 0)

def getDivisors(a,b):
    divisors = []
    for i in range(2,min(a,b)+1):
        if a % i == 0 and b % i == 0:
            divisors.append(i)
    return divisors

N,M = map(int,input().split())
a = input()
b = input()

if a[0] != b[0]:
    print(-1)
elif gcd(N,M) == 1:
    print(lcm(N,M))
elif N != M:
    divisors = getDivisors(N,M)

    for i in divisors:
        k = N//i
        l = M//i
        while k <= N and l <= M:
            if a[k] != b[l]:
                print(-1)
                quit()
            k *= 2
            l *= 2
    print(lcm(N,M))
else:
    if a == b: print(N)
    else: print(-1)




Fixed submission:
from fractions import *

def lcm(a,b): 
    return int(abs(a * b) / gcd(a,b) if a and b else 0)

def getDivisors(a,b):
    divisors = []
    for i in range(2,min(a,b)+1):
        if a % i == 0 and b % i == 0:
            divisors.append(i)
    return divisors

N,M = map(int,input().split())
a = input()
b = input()

if a[0] != b[0]:
    print(-1)
elif gcd(N,M) == 1:
    print(lcm(N,M))
elif N != M:
    divisors = getDivisors(N,M)

    for i in divisors:
        k = N//i
        l = M//i
        while k < N and l < M:
            if a[k] != b[l]:
                print(-1)
                quit()
            k += N//i
            l += M//i
    print(lcm(N,M))
else:
    if a == b: print(N)
    else: print(-1)

Buggy python submission (verdict: Runtime Error):
from fractions import *

def lcm(a,b): 
    return int(abs(a * b) / gcd(a,b) if a and b else 0)

N,M = map(int,input().split())
a = input()
b = input()

if N % M != 0 and M % N != 0:
    print(lcm(N,M))
elif N % M == 0:
    # a is the larger string
    step = N // M
    for i in range(M):
        if b[i] != a[i + step]:
            print(-1)
            quit()
    print(N)
else:
    # b is the larger string
    step = M // N
    for i in range(N):
        if a[i] != b[i + step]:
            print(-1)
            quit()
    print(M)




Fixed submission:
from fractions import *

def lcm(a,b): 
    return int(abs(a * b) / gcd(a,b) if a and b else 0)

def getDivisors(a,b):
    divisors = []
    for i in range(2,min(a,b)+1):
        if a % i == 0 and b % i == 0:
            divisors.append(i)
    return divisors

N,M = map(int,input().split())
a = input()
b = input()

if a[0] != b[0]:
    print(-1)
elif gcd(N,M) == 1:
    print(lcm(N,M))
elif N != M:
    divisors = getDivisors(N,M)

    for i in divisors:
        k = N//i
        l = M//i
        while k < N and l < M:
            if a[k] != b[l]:
                print(-1)
                quit()
            k += N//i
            l += M//i
    print(lcm(N,M))
else:
    if a == b: print(N)
    else: print(-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())

X = []
Y = []
h = []
for i in range(N):
    a,b,c = map(int,input().split())

    X.append(a)
    Y.append(b)
    h.append(c)

for Cx in range(101):
    p = False
    for Cy in range(101):
        w = True
        previous = None
        for i in range(0,N):
            H = h[i] + abs(X[i] - Cx) + abs(Y[i] - Cy)
            if H - abs(X[i] - Cx) - abs(Y[i] - Cy) >= 0:
                if not previous:
                    previous = H
                elif H != previous or H < 1:
                    w = False
                    break
        
        if w:
            answer = [Cx,Cy,H]
            p = True
            break

    if p:
        break

print(answer[0],answer[1],answer[2])

Fixed submission:
N = int(input())

X = []
Y = []
h = []
for i in range(N):
    a,b,c = map(int,input().split())

    if c > 0:
        p = i
    X.append(a)
    Y.append(b)
    h.append(c)

for Cx in range(101):
    for Cy in range(101):
        works = True
        H = h[p] + abs(X[p] - Cx) + abs(Y[p] - Cy)
        for i in range(N):
            if h[i] != max(H - abs(X[i] - Cx) - abs(Y[i] - Cy), 0):
                works = False
                break
        
        if works:
            print(Cx,Cy,H)
            quit()
Buggy python submission (verdict: Runtime Error):
print(abs(int(input)-48))

Fixed submission:
print(48-int(input()))
Buggy python submission (verdict: Runtime Error):
import sys

input = sys.stdin.readline
print = sys.stdout.write

n,k = map(int,input().split())

freq = {}
a = [int(i) for i in input().split()]

for i in a:
    if i not in freq:
        freq[i] = 1
    else:
        freq[i] += 1

total = 0
while len(freq.keys()) > k:
    mn = (0,2000001)
    for i in freq.keys():
        if freq[i] < mn[1]:
            mn = (i,freq[i])
    total += mn[1]
    del freq[mn[0]]
print(str(total))


Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())

freq = {}
a = [int(i) for i in input().split()]

for i in a:
    if i not in freq:
        freq[i] = 1
    else:
        freq[i] += 1

total = 0
while len(freq.keys()) > k:
    mn = (0,2000001)
    for i in freq.keys():
        if freq[i] < mn[1]:
            mn = (i,freq[i])
    total += mn[1]
    del freq[mn[0]]
print(total)


Fixed submission:
n,k = map(int,input().split())

freq = {}
a = [int(i) for i in input().split()]

for i in a:
    if i not in freq:
        freq[i] = 1
    else:
        freq[i] += 1
        
l = sorted(freq.values())
total = 0
index = 0

while len(l) - index > k:
    total += l[index]
    index += 1
print(total)
Buggy python submission (verdict: Runtime Error):
use = input()

total = 0
p = 0
p1 = len(use) - 1
while p != p1:
	if use[p] == use[p1]:
		p += 1
		p1 -= 1
	elif use[p] == "x":
		p += 1
		total += 1
	elif use[p1] == "x":
		p1 -= 1
		total += 1
	else:
		total = -1
		break
print(total)


Fixed submission:
use = input()

total = 0
p = 0
p1 = len(use) - 1
while p < p1:
	if use[p] == use[p1]:
		p += 1
		p1 -= 1
	elif use[p] == "x":
		p += 1
		total += 1
	elif use[p1] == "x":
		p1 -= 1
		total += 1
	else:
		total = -1
		break
print(total)
Buggy python submission (verdict: Runtime Error):
candy = map(int, raw_input().split())
mx = max(candy)
total = 0
for n in candy:
    if n != mx:
        total += n
if total == mx:
    print("Yes")
else:
    print("No")


Fixed submission:
# -*- coding: utf-8 -*-
import sys

candy = map(int, raw_input().split())
mx = max(candy)
total = 0
for n in candy:
    if n != mx:
        total += n
if total == mx:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import numpy as np

# input
N = int(input().split()[0])
sequence = np.array(list( map(int, input().split()) ))

# a_N>N must be removed
remove = np.sum(sequence>N)
sequence = sequence[sequence<=N]

index = np.unique(sequence)

for idx in index:

    n_idx = np.sum(sequence==idx)
    if n_idx < idx:
        remove += n_idx
    else:
        remove += (n_idx-idx)

print(remove)




Fixed submission:
import numpy as np

# input
N = int(input().split()[0])
sequence = np.array(list( map(int, input().split()) ))

# a_N>N must be removed
remove = np.sum(sequence>N)
sequence = sequence[sequence<=N]

index = np.unique(sequence)

for idx in index:

    n_idx = np.sum(sequence==idx)
    if n_idx < idx:
        remove += n_idx
    else:
        remove += (n_idx-idx)

print(remove)

Buggy python submission (verdict: Runtime Error):
import numpy as np

# input
N = int(input().split())
sequence = list( map(int, input().split()) )

# a_N>N must be removed
remove = np.sum(sequence>N)
sequence = sequence[sequence<=N]

index = np.unique(sequence)

for idx in index(sequence):

    n_idx = np.sum(sequence==idx)
    if n_idx < idx:
        remove += n_idx
    else:
        remove += (n_idx-idx)

print(remove)

Fixed submission:
import numpy as np

# input
N = int(input().split()[0])
sequence = np.array(list( map(int, input().split()) ))

# a_N>N must be removed
remove = np.sum(sequence>N)
sequence = sequence[sequence<=N]

index = np.unique(sequence)

for idx in index:

    n_idx = np.sum(sequence==idx)
    if n_idx < idx:
        remove += n_idx
    else:
        remove += (n_idx-idx)

print(remove)
Buggy python submission (verdict: Runtime Error):
s = input()
s = s.replace("/", "")
if s <= 20190430 :
    print("Heisei")
else :
    print("TBD")

Fixed submission:
s = input()
s = int(s.replace("/", ""))
if s <= 20190430 :
    print("Heisei")
else :
    print("TBD")
Buggy python submission (verdict: Runtime Error):
n = int(input())
money = []
for _ in range(n) :
    xi, yi = input().split()
    xi = int(xi)
    if yi == "JPY" :
        xi = xi
    elif yi == "BTC" :
        xi = xi * 380000.0
    money += [xi]
print(sum(money))

Fixed submission:
n = int(input())
money = []
for _ in range(n) :
    xi, yi = input().split()
    xi = float(xi)
    if yi == "JPY" :
        xi = xi
    elif yi == "BTC" :
        xi = xi * 380000.0
    money += [xi]
print(sum(money))
Buggy python submission (verdict: Runtime Error):
 n = input()
 dict = {"1" : "9", "9" : "1"}
 ans = ""
for i in range(len(n)) :
    ans += dict[n[i]]
print(ans)

Fixed submission:
n = input()
dict = {"1" : "9", "9" : "1"}
ans = ""
for i in range(len(n)) :
    ans += dict[n[i]]
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = []
for _ in range(n) :
    a += [int(input())]
print(max(a)- min(a))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
print(max(a)- min(a))
Buggy python submission (verdict: Runtime Error):
n = input()
sn = sum([int(i) for i in list(n)])
if n % sn == 0 :
    print("Yes")
else :
    print("No")

Fixed submission:
n = input()
sn = sum([int(i) for i in list(n)])
if int(n) % sn == 0 :
    print("Yes")
else :
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())
numalllist = [num for num in range(a, b + 1)]
if 2 * k >= b - a + 1 :
    for i in numalllist :
        print(i)
else :
    for i in numalllist[:k] :
        print(i)
    for i in numalllist[-k:] :
        print(i)


Fixed submission:
a, b, k = map(int, input().split())
if 2 * k >= b - a + 1 : 
    i = a
    while i <= b :
        print(i)
        i += 1
else :
    i = a
    while i <= a + k - 1 :
        print(i)
        i += 1
    i = b - k + 1
    while i <= b :
        print(i)
        i += 1

Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())
numalllist = [num for num in range(a, b + 1)]
if 2 * k >= len(numalllist) :
    for i in numalllist :
        print(i)
else :
    anslist = numalllist[:k] + numalllist[-k:]
    for i in anslist :
        print(i)

Fixed submission:
a, b, k = map(int, input().split())
if 2 * k >= b - a + 1 : 
    i = a
    while i <= b :
        print(i)
        i += 1
else :
    i = a
    while i <= a + k - 1 :
        print(i)
        i += 1
    i = b - k + 1
    while i <= b :
        print(i)
        i += 1

Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())
numalllist = [num for num in range(a, b + 1)]
if k >= len(numalllist) :
    for i in numalllist :
        print(i)
else :
    small = numalllist[:k]
    large = sorted(numalllist, reverse=True)[:k]
    anslist = sorted(list(set(small + large)))
    for i in anslist :
        print(i)

Fixed submission:
a, b, k = map(int, input().split())
if 2 * k >= b - a + 1 : 
    i = a
    while i <= b :
        print(i)
        i += 1
else :
    i = a
    while i <= a + k - 1 :
        print(i)
        i += 1
    i = b - k + 1
    while i <= b :
        print(i)
        i += 1
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    if int(s[:a]) is int and int(s[a+1:]) is int :
        print("Yes")
    else :
        print("No")
else :
    print("No")

Fixed submission:
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if (isinstance(int(s[:a]),int)) and (isinstance(int(s[a+1:]),int)) :
            print("Yes")
        else :
            print("No")
    except :
        print("No")
else :
    print("No")
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
l = list(map(int, input().split())).sort(reverse=True)
print(sum(l[0:k]))

Fixed submission:
n, k = map(int, input().split())
l = sorted(list(map(int, input().split())),reverse=True)
print(sum(l[0:k]))
Buggy python submission (verdict: Runtime Error):
n
a = list(map(int, input().split()))
print(max(a)-min(a))


Fixed submission:
n = input()
a = list(map(int, input().split()))
print(max(a)-min(a))
Buggy python submission (verdict: Runtime Error):
x、y = map(input().split())
group1 = (1,3,5,7,8,10,12)
group2 = (4,6,9,11)
group3 = (2)
if (x in group1) and (y in group1) :
    print("Yes")
if (x in group2) and (y in group2) :
    print("Yes")
if (x in group3) and (y in group3) :
    print("Yes")
else:
    print("No")

Fixed submission:
x, y = map(int,input().split())
group1 = {1,3,5,7,8,10,12}
group2 = {4,6,9,11}
group3 = {2}
if (x in group1) and (y in group1) :
    print("Yes")
elif (x in group2) and (y in group2) :
    print("Yes")
elif (x in group3) and (y in group3) :
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
x = int(input())
p = x // 11
q = x % 11
if q = 0 :
    ans = 2 * p
elif q <= 6 :
    ans = 2 * p + 1
else :
    ans = 2 * p + 2
print(ans)

Fixed submission:
x = int(input())
p = x // 11
q = x % 11
if q == 0 :
    ans = 2 * p
elif q <= 6 :
    ans = 2 * p + 1
else :
    ans = 2 * p + 2
print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
ans = int(n * (n + 1) / 2)
print(ans)

Fixed submission:
n = int(input())
ans = int(n * (n + 1) /2)
print(ans)