Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

ans = ['' for _ in range(N)]

for _ in range(M):
    s, c = map(str, input().split())
    if (ans[int(s)-1] != '') and (ans[int(s)-1] != c):
        print("-1")
        break
    else:
        ans[int(s)-1] = c
else:
    if (N > 1) and (ans[0] == ''):
        ans[0] = '1'
    ans = ['0' if s == '' else s for s in ans]

    if (N > 1) and (ans[0] == '0'):
        print("-1")
    else:
        print(''.join(ans))


Fixed submission:
import math

n = int(input())
print(math.ceil(n/2))
Buggy python submission (verdict: Runtime Error):
a = input()
print(a + a*a + a*a*a)

Fixed submission:
a = int(input())

print(a + a**2 + a**3)
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
counter = 0

while(S != T):
    for i in range(len(S)):
        if S[i] != T[i]:
            S[i] = T[i]
            counter = counter + 1
        else:
            pass

print(counter)

Fixed submission:
S = list(i for i in input())
T = list(i for i in input())

counter = 0

while(S != T):
    for i in range(len(S)):
        if S[i] != T[i]:
            S[i] = T[i]
            counter = counter + 1
        else:
            pass

print(counter)
Buggy python submission (verdict: Runtime Error):
S = [i for i in input()]
k = ['A', 'C', 'G', 'T']
count_res = []
count = 0
for i in S:
    if i in k:
        count = count + 1
    else:
        count_res.append(count)
        count = 0
count_res.sort()
print(count_res[-1])

Fixed submission:
S=input()
L=["A","C","G","T"]
cnt=0
ans=0
for i in range(len(S)):
    if S[i] in L:
        cnt+=1
        ans=max(ans,cnt)
    else:
        cnt=0
    
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, K = input().split(" ")
A, B, K = int(A), int(B), int(K)

res = []

for i in range(A, 1, -1):
  if A % i == 0 and B % i == 0:
    res.append(i)

if len(res) > 1:
  print(res[K-1])
else:
  print(1)

Fixed submission:
A, B, K = input().split(" ")
A, B, K = int(A), int(B), int(K)

res = []

for i in range(A, 0, -1):
  if A % i == 0 and B % i == 0:
    res.append(i)

print(res[K-1])

Buggy python submission (verdict: Runtime Error):
A, B, K = input().split(" ")
A, B, K = int(A), int(B), int(K)

res = []

for i in range(A, 1, -1):
  if A % i == 0 and B % i == 0:
    res.append(i)

print(res[K-1])

Fixed submission:
A, B, K = input().split(" ")
A, B, K = int(A), int(B), int(K)

res = []

for i in range(A, 0, -1):
  if A % i == 0 and B % i == 0:
    res.append(i)

print(res[K-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "TLE"):
    TLE += 1
  if(tmp == "RE")
    RE += 1
print("AC x "+str(AC))
print("WA x " +str(WA))
print("TLE x " +str(TLE))
print("RE x " +str(RE))

Fixed submission:
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "TLE"):
    TLE += 1
  if(tmp == "RE"):
    RE += 1
print("AC x "+str(AC))
print("WA x " +str(WA))
print("TLE x " +str(TLE))
print("RE x " +str(RE))

Buggy python submission (verdict: Runtime Error):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "TLE"):
    TLE += 1
  else:
    RE += 1
print(AC x str(AC))
print(WA x str(WA))
print(TLE x str(TLE))
print(RE x str(RE))

Fixed submission:
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "TLE"):
    TLE += 1
  if(tmp == "RE"):
    RE += 1
print("AC x "+str(AC))
print("WA x " +str(WA))
print("TLE x " +str(TLE))
print("RE x " +str(RE))
Buggy python submission (verdict: Runtime Error):
S = input()
T = input()
for i in range(len(S)):
  if(S[i] != T[i]):
    ans += 1
print(str(ans))

Fixed submission:
S = input()
T = input()
ans = 0
for i in range(len(S)):
  if(S[i] != T[i]):
    ans += 1
print(str(ans))
Buggy python submission (verdict: Runtime Error):
A,B = map(input().split())
A = int(A)
B = B.replace(".","")
B = int(B)
ans = int((A * B)//100)
print(str(ans))

Fixed submission:
A,B = input().split()
A = int(A)
B = B.replace(".","")
B = int(B)
ans = int((A * B)//100)
print(str(ans))
Buggy python submission (verdict: Runtime Error):
N = int(input())
if(N % 10 == 0 or N % 10 == 1 N % 10 == 6 N % 10 == 8):
  print("pon")
elif(N % 10 == 3):
  print("bon")
else:
  print("hon")

Fixed submission:
N = int(input())
if(N % 10 == 0 or N % 10 == 1 or N % 10 == 6 or N % 10 == 8):
  print("pon")
elif(N % 10 == 3):
  print("bon")
else:
  print("hon")
Buggy python submission (verdict: Runtime Error):
S = input()
if(S == ABC):
  print("ARC")
else:
  print("ABC")

Fixed submission:
S = input()
if(S == "ABC"):
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
H = list(map(int,input().split()))
List = []
for k in range(1,N+1):
  List.append(k)
for i in range(M):
  A,B = map(int,input().split())
  tmpA = H[A-1]
  tmpB = H[B-1]
  if(tmpA < tmpB):
    if(List.count(A) == 0):
      pass
    else:
      List.remove(A)
  elif(tmpA > tmpB):
    if(List.count(B) == 0):
      pass
    else:
      List.remove(B)
  else:
    if(List.count(A) == 0):
      pass
    else:
      List.remove(A)
    if(List.count(B) == 0):
      pass
    else:
      List.remove(B)
print(str(len(List)))

Fixed submission:
N,M = map(int,input().split())
H = list(map(int,input().split()))
List = [0]*N
for i in range(M):
    A,B = map(int,input().split())
    if(H[A-1] > H[B-1]):
        List[B-1] = 1
    elif(H[A-1] < H[B-1]):
        List[A-1] = 1
    else:
        List[A-1] = 1
        List[B-1] = 1
print(str(List.count(0)))
Buggy python submission (verdict: Runtime Error):
S,W = int(input().split())
if(S > W):
  print("safe")
else:
  print("unsafe")

Fixed submission:
S,W = map(int,input().split())
if(S > W):
  print("safe")
else:
  print("unsafe")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
tmp2 = 0
for i in range(N):
  if(i == 0):
    tmp=A.count(1)
    print(str(tmp))
  else:
    tmp2 = i + 1
    tmp=A.count(tmp2)
    print(str(tmp))

Fixed submission:
import collections
N = int(input())
A = list(map(int,input().split()))
c = collections.Counter(A)
for i in range(1,N+1):
  print(c[i])
Buggy python submission (verdict: Runtime Error):
S = input()
if(S[3] == S[4] and S[5] == S[6]):
  print("Yes")
else:
  print("No")

Fixed submission:
S = input()
if(S[2] == S[3] and S[4] == S[5]):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
H,W = map(int,input().split())
if((H*W)%2 == 0):
  print(str(H*W)/2)
else:
  print(str(H*W)//2+1)

Fixed submission:
H,W = map(int,input().split())
if(H == 1 or W == 1):
  print("1")
elif((H*W)%2 == 0):
  print(str((H*W)//2))
else:
  print(str((H*W)//2+1))
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
H = list(map(int,input().split()))
H = sorted(H)[::-1]
for i in range(K):
  del H[0]
print(str(sum(H)))


Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))
H = sorted(H)[::-1]
del H [0:K]
print(str(sum(H)))

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
H = list(map(int,input().split()))
H = sorted(H)[::-1]
for i in range(K):
  del H[0]
print(str(sum(H)))

Fixed submission:
N,K = map(int,input().split())
H = list(map(int,input().split()))
H = sorted(H)[::-1]
del H [0:K]
print(str(sum(H)))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
List = []
ans = 0
for i in range(N):
  if(i == 0):
    ans += 1
  else:
    tmp = P[i-1]
    List.append(tmp)
    if(P[i] <= min(List)):
      ans += 1
print(str(ans))

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
mi = P[0]
ans = 0
for i in range(N):
  if(i == 0):
    ans += 1
  else:
    if(P[i] <= mi):
      ans += 1
      mi = P[i]
print(str(ans))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
List = []
ans = 0
for i in range(N):
  if(i == 0):
    ans += 1
  else:
    tmp = P[i-1]
    List.append(tmp)
    if(P[i] <= min(List)):
      ans += 1
print(str(ans))

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
mi = P[0]
ans = 0
for i in range(N):
  if(i == 0):
    ans += 1
  else:
    if(P[i] <= mi):
      ans += 1
      mi = P[i]
print(str(ans))

Buggy python submission (verdict: Runtime Error):
N = int(input())
P = list(map(int,input().split()))
List = []
ans = 0
for i in range(N):
  if(i == 0):
    ans += 1
  else:
    tmp = P.pop(0)
    List.append(tmp)
    if(P[i] <= min(List)):
      ans += 1
print(str(ans))

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
mi = P[0]
ans = 0
for i in range(N):
  if(i == 0):
    ans += 1
  else:
    if(P[i] <= mi):
      ans += 1
      mi = P[i]
print(str(ans))
Buggy python submission (verdict: Runtime Error):
N = int(input)
n = N / 2
print(str(n / N))

Fixed submission:
N = int(input())
if(N % 2 == 0):
  n = N // 2
else:
  n = (N + 1) // 2
print(str(n / N))
Buggy python submission (verdict: Runtime Error):
N = int(input())
d = list(map(int,input().split()))
chuou1 = d[N//2]
chuou2 = d[(N//2)+1]
print(str(chuou2 - chuou1))

Fixed submission:
N = int(input())
d = list(map(int,input().split()))
d = sorted(d)
chuou1 = d[N//2-1]
chuou2 = d[(N//2)]
if(chuou2 - chuou1 < 0):
  print("0")
else:
  print(str(chuou2 - chuou1))
Buggy python submission (verdict: Runtime Error):
S = input()
x = len(S)
y = 15 - x
z = ""
point = 0
for i in range(x + 1):
  z = S[i]
  if (z == "o"):
    point += 1
  else:
    
if (point + y >= 8):
  print("YES")
else:
  print("NO")

Fixed submission:
S = input()
x = len(S)
y = 15 - x
z = ""
point = 0
for i in range(x):
  z = S[i]
  if (z == "o"):
    point += 1
  else:
    point += 0
    
y = y + point
if (y >= 8):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
K = int(input())
a = ""
b = S[K]
for i in range(N):
  a = S[i]
  if (a == b):
    print(a,end = "")
  else:
    print("*",end = "")

Fixed submission:
N = int(input())
S = input()
K = int(input())
a = ""
b = S[K - 1]
for i in range(N):
  a = S[i]
  if (a == b):
    print(a,end = "")
  else:
    print("*",end = "")
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
h = [0]*N
for i in range(N):
    h[i] = int(input())
h = sorted(h)
ans = 10**10
for i in range(N-2):
    tmp = h[i+K-1] - h[i]
    ans = min(tmp,ans)
print(ans)

Fixed submission:
N,K = map(int,input().split())
h = []
ans = 10**10
for i in range(N):
  tmp = int(input())
  h.append(tmp)
h = sorted(h)
for i in range(N-K+1):
  h2 = h[i]
  h3 = h[i+K-1]
  ans = min(h3 - h2,ans)
print(str(ans))

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
h = []
ans = 10**10
for i in range(N):
    tmp = int(input())
    h.append(tmp)
h = sorted(h)
for i in range(N-K+1):
    tmp2 = h[i:i+K]
    ans = min((max(tmp2)-min(tmp2)),ans)
print(str(ans))

Fixed submission:
N,K = map(int,input().split())
h = []
ans = 10**10
for i in range(N):
  tmp = int(input())
  h.append(tmp)
h = sorted(h)
for i in range(N-K+1):
  h2 = h[i]
  h3 = h[i+K-1]
  ans = min(h3 - h2,ans)
print(str(ans))

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
h = []
h2 = []
ans = 10**10
for i in range(N):
  tmp = int(input())
  h.append(tmp)
h = sorted(h)
for i in range(N-K+1):
  h2 = h[i:i+K]
  ans = min(max(h2) - min(h2),ans)
print(str(ans))

Fixed submission:
N,K = map(int,input().split())
h = []
ans = 10**10
for i in range(N):
  tmp = int(input())
  h.append(tmp)
h = sorted(h)
for i in range(N-K+1):
  h2 = h[i]
  h3 = h[i+K-1]
  ans = min(h3 - h2,ans)
print(str(ans))
Buggy python submission (verdict: Runtime Error):
X,Y = int(input())
print(X + Y / 2)

Fixed submission:
X,Y = map(int,input().split())
print(X + Y // 2)
Buggy python submission (verdict: Runtime Error):
N = int(input()) - 1
T,A = map(int,input().split())
tmp = 0
X = 0
List = list(map(int,input().split()))
List2 = []
for i in range(N):
  tmp =abs(A - (T - List.pop(i) * 0.001))
  List2.append(tmp)
X = min(List2)
print(str(List2.index(X) + 1))

Fixed submission:
N = int(input())
T,A = map(int,input().split())
List = list(map(int,input().split()))
List = [abs(A - (T - x * 0.006)) for x in List]
x = min(List)
print(str(List.index(x) + 1))

Buggy python submission (verdict: Runtime Error):
N = int(input()) - 1
T,A = map(int,input().split())
tmp = 0
X = 0
List = list(map(int,input().split()))
List2 = []
for i in range(N):
  tmp =abs(A - (T - List.pop(i) * 0.001))
  List2.append(tmp)
X = min(List2)
print(List2.index(X) + 1)

Fixed submission:
N = int(input())
T,A = map(int,input().split())
List = list(map(int,input().split()))
List = [abs(A - (T - x * 0.006)) for x in List]
x = min(List)
print(str(List.index(x) + 1))
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = N // 4 + 1
Z = N // 7 + 1
Y = sum(4*a + 7*b == N for a in range(X) for b in range(Z))
if (Y != 0):
  print("Yes")
else:
  print("No")

Fixed submission:
N,K = map(int,input().split())
if(N%K == 0):
  print("0")
else:
  print("1")
Buggy python submission (verdict: Runtime Error):
D,N = map(int,input().split())
print(str((100 ** D) * K))

Fixed submission:
D,N = map(int,input().split())
if(N == 100):
  print(str((100 ** D) * N + 100 ** D))
else:
  print(str((100 ** D) * N))
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())
a = 0
b = 0
c = 0
for i in range(K):
  a = B + C
  b = A + C
  c = A + B
  A = a
  B = b
  C = c
if (abs(A - B) > 10**18):
  print("Unfair")
else:
  print(str(A - B))

Fixed submission:
A,B,C,K = map(int,input().split())
if(K == 0):
  ans = A - B
elif(K % 2 == 1):
  ans = B - A
else:
  ans = A - B
if(ans > 10 ** 18):
  print("Unfair")
else:
  print(str(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())
a = 0
b = 0
c = 0
for i in range(K):
  a = B + C
  b = A + C
  c = A + B
  A = a
  B = b
  C = c
if (abs(A - B) > 10**18):
  print("Unfair")
else:
  print(str(A - B))

Fixed submission:
A,B,C,K = map(int,input().split())
if(K == 0):
  ans = A - B
elif(K % 2 == 1):
  ans = B - A
else:
  ans = A - B
if(ans > 10 ** 18):
  print("Unfair")
else:
  print(str(ans))

Buggy python submission (verdict: Runtime Error):
A,B,C,K = map(int,input().split())
a,b,c = 0
for i in range(K):
  a = B + C
  b = A + C
  c = A + B
  A = a
  B = b
  C = c
if (abs(A - B) < 10**18):
  print("Unfair")
else:
  print(str(A - B))

Fixed submission:
A,B,C,K = map(int,input().split())
if(K == 0):
  ans = A - B
elif(K % 2 == 1):
  ans = B - A
else:
  ans = A - B
if(ans > 10 ** 18):
  print("Unfair")
else:
  print(str(ans))
Buggy python submission (verdict: Runtime Error):
X = int(input())
for i in range(X+1):
  for p in range(X+1):
    ans = max(i ** p,ans)
print(str(ans))

Fixed submission:
X = int(input())
ans = 0
for i in range(1,100):
  for p in range(2,100):
    tmp = i ** p
    if(tmp <= X):
      ans = max(tmp,ans)
    else:
      pass
print(str(ans))
Buggy python submission (verdict: Runtime Error):
N,X = map(int,input().split())
m = list(int,input().split())
count = 0
A = sum(m)
X = X - A
count = len(m)
B = min(m)
while(X >= B):
  count += 1
  X = X - B
print(str(count))

Fixed submission:
N,X = map(int,input().split())
m = [int(input()) for i in range(N)]
count = 0
A = sum(m)
X = X - A
count = N
B = min(m)
while(X >= B):
  count += 1
  X = X - B
print(str(count))
Buggy python submission (verdict: Runtime Error):
a,b = map(input().split())
if (a*b) % 2:
  print("Even")
else:
  print("Odd")


Fixed submission:
a,b = map(int,input().split())
if (a*b) % 2:
  print("Odd")
else:
  print("Even")
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split)
x = a+b
if (x % 2 == 0):
  print(x/2)
else:
  print(x/2 + 1)

Fixed submission:
a,b = map(int,input().split())
x = a+b
if (x % 2 == 0):
  print(int(x/2))
else:
  print(int(x/2 + 1))
Buggy python submission (verdict: Runtime Error):
N = int(input())
if(N == 1):
  A1,B1 = map(int,input().split())
  print(str(A1+B1))
for i in range(N-1):
  if(i == 0):
    A1,B1 = map(int,input().split())
    A2,B2 = map(int,input().split())
    if(A1 <= A2):
      MA = A2
      MB = B2
    else:
      MA = A1
      MB = B1
    A1 = A2
    B1 = B2
  else:
    A2,B2 = map(int,input().split())
    if(MA <= A2):
      MA = A2
      MB = B2
    A1 = A2
    B1 = B2
print(str(MA + MB))

Fixed submission:
N = int(input())
if(N == 1):
  A1,B1 = map(int,input().split())
  print(str(A1+B1))
  exit()
for i in range(N-1):
  if(i == 0):
    A1,B1 = map(int,input().split())
    A2,B2 = map(int,input().split())
    if(A1 <= A2):
      MA = A2
      MB = B2
    else:
      MA = A1
      MB = B1
    A1 = A2
    B1 = B2
  else:
    A2,B2 = map(int,input().split())
    if(MA <= A2):
      MA = A2
      MB = B2
    A1 = A2
    B1 = B2
print(str(MA + MB))
Buggy python submission (verdict: Runtime Error):
import math
N,M = int(input())
if(N == 1 or M == 1):
  print("0")
else:
  print(str(((math.factorial(N) * math.factorial(M))% 10 ** 9 + 7)))

Fixed submission:
import math
N,M = map(int,input().split())
if(abs(N - M) >= 2):
  print("0")
else:
  if(N != M):
    print(str(((math.factorial(N) * math.factorial(M)) % (10 ** 9 + 7))))
  else:
    print(str(((math.factorial(N) * math.factorial(M))* 2 % (10 ** 9 + 7))))
Buggy python submission (verdict: Runtime Error):
S = input()
alpha = lambda c:chr(c+96)
List = []
for i in range(len(S)):
  tmp = S[i]
  List.append[tmp]
for k in range(1,27):
  if(List.count(alpha(k)) <= 1):
    pass
  else:
    print("no")
    exit()
print("yes")

Fixed submission:
S = input()
alpha = lambda c:chr(c+96)
List = []
for i in range(len(S)):
  tmp = S[i]
  List.append(tmp)
for k in range(1,27):
  if(List.count(alpha(k)) <= 1):
    pass
  else:
    print("no")
    exit()
print("yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
x = 0
length = len(S)
List = [0]
for i in range(length):
  if(S[i] == I):
    x += 1
    List.append(x)
  else:
    x -= 1
    List.append(x)
print(max(List))

Fixed submission:
N = int(input())
S = input()
x = 0
length = len(S)
List = [0]
for i in range(length):
  if(S[i] == "I"):
    x += 1
    List.append(x)
  else:
    x -= 1
    List.append(x)
print(str(max(List)))
Buggy python submission (verdict: Time Limit Exceeded):
K,S = map(int,input().split())
count = 0
for x in range(0,K+1):
  for y in range(0,K+1):
    for z in range(0,K+1):
      if(x + y + z == S):
        count += 1
print(str(count))

Fixed submission:
K,S = map(int,input().split())
count = 0
for x in range(0,K+1):
  for y in range(0,K+1):
    if (S - (x + y) <= K and S - (x + y) >= 0):
      count += 1
print(str(count))
Buggy python submission (verdict: Runtime Error):
n,r = int(input().split())
n = int(n)
r = int(r)

if n >= 10:
  i = r
else:
  i = r + 100 * (10 - n)
print(i)

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

if n >= 10:
  i = r
else:
  i = r + 100 * (10 - n)
print(i)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,D=map(int,input().split())
def ans167(A,B,C,K):
    A_count=0
    B_count=0
    C_count=0
    for i in range(K):
        if A>0:
            A_count+=1
            A-=1
        elif B>0:
            B_count+=1
            B-=1
        else:
            C_count+=1
            C-=1
    return A_count-C_count
print(ans167(A,B,C,D))

Fixed submission:
A,B,C,K=map(int,input().split())

def ans167(A, B, C, K):
    if A>=K:
        return(K)
    elif A+B>=K:
        return(A)
    else:
        return(A-(K-A-B))

print(ans167(A,B,C,K))
Buggy python submission (verdict: Runtime Error):
S=str(input())
if len(set(S))=1:
  print("No")
 else:
  print(Yes)

Fixed submission:
S=str(input())
if len(set(S))==1:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
H,N=map(int,input().split())
A=input()
waza=0
for i in range(0,N):
    waza=waza+int(A.split()[i])
if waza>=H:
    print("Yes")
else:
    print("No")

Fixed submission:
H,N=map(int,input().split())
A=input()
list_A=A.split()
waza=0
for i in range(0,N):
    waza=waza+int(list_A[i])
if waza>=H:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    l=sorted([A,B])
    ans_list=[]
    for i in range(1,l[1]):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))

Fixed submission:
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    if A>=B:
        n=A
    else:
        n=B
    ans_list=[]
    for i in range(1,n+1):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))

Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    l=sorted([A,B])
    ans_list=[1]
    for i in range(2,l[1]):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))


Fixed submission:
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    if A>=B:
        n=A
    else:
        n=B
    ans_list=[]
    for i in range(1,n+1):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))

Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    l=sorted([A,B])
    ans_list=[1]
    for i in range(2,l[1]):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))

Fixed submission:
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    if A>=B:
        n=A
    else:
        n=B
    ans_list=[]
    for i in range(1,n+1):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))

Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    l=sorted([A,B])
    ans_list=[1]
    for i in range(2,l[1]):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[K-1]

print(ans120(A,B,K))

Fixed submission:
A,B,K=map(int,input().split())

def ans120(A:int, B:int, K:int):
    if A>=B:
        n=A
    else:
        n=B
    ans_list=[]
    for i in range(1,n+1):
        if A%i==0 and B%i==0:
            ans_list.append(i)
    return ans_list[-K]

print(ans120(A,B,K))
Buggy python submission (verdict: Runtime Error):
A,B,C,D=map(int,input(),split())
if A+B>C+D:
  print("Left")
elif:
  A+B<C+D:
    print("Right")
else:
  print("Balanced")

Fixed submission:
A,B,C,D=map(int,input().split())
if A+B>C+D:
  print("Left")
elif A+B<C+D:
    print("Right")
else:
  print("Balanced")
Buggy python submission (verdict: Runtime Error):
a

Fixed submission:
import math
a,b=map(int,input().split())
print(math.ceil((a+b)/2))
Buggy python submission (verdict: Runtime Error):
N=input()
j_count=0
for i in range(0,3):
    if N[i]==N[i+1]:
        j_count+=1

if j_count>=2　and N[1]==N[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
N=input()
j_count=0
for i in range(0,3):
    if N[i]==N[i+1]:
        j_count+=1
if j_count>=2 and N[1]==N[2]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
N=input()#整数Nを受け取る
#Nのi文字目とi＋1文字目が同じであればカウントを増やす。
j_count=0
for i in range(0,3):
    if N[i]==N[i+1]:
        j_count+=1

#カウントが2以上かつ2文字目＝3文字目であればYes、でなければNoを返す。
if j_count>=2　and N[1]==N[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
N=input()
j_count=0
for i in range(0,3):
    if N[i]==N[i+1]:
        j_count+=1
if j_count>=2 and N[1]==N[2]:
    print("Yes")
else:
    print("No")