Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
dp = [0 for i in range(100)]
dp[6] = 1
dp[3] = 1
for i in range(100):
  if i>=4 and dp[i-4]==1:
    dp[i] = 1
  if i>=7 and dp[i-7]==1:
    dp[i] = 1
if dp(int(input())-1)==1:
  print("Yes")
else:
  print("No")

Fixed submission:
dp = [0 for i in range(100)]
dp[6] = 1
dp[3] = 1
for i in range(100):
  if i>=4 and dp[i-4]==1:
    dp[i] = 1
  if i>=7 and dp[i-7]==1:
    dp[i] = 1
if dp[int(input())-1]==1:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
dp = [0 for i in range(100)]
dp[6] = 1
dp[3] = 1
for i in range(100):
  if i>=4 and dp[i-4]==1:
    dp[i] = 1
  if i>=7 and dp[i-7]==1:
    dp[i] = 1
if dp(int(input()-1))==1:
  print("Yes")
else:
  print("No")

Fixed submission:
dp = [0 for i in range(100)]
dp[6] = 1
dp[3] = 1
for i in range(100):
  if i>=4 and dp[i-4]==1:
    dp[i] = 1
  if i>=7 and dp[i-7]==1:
    dp[i] = 1
if dp[int(input())-1]==1:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = b-a
#高い方の塔の高さがsum(1,2,...,c)=c(c+1)/2になります
h = c(c+1)//2
print(h-b)

Fixed submission:
a, b = map(int, input().split())
c = b-a
#高い方の塔の高さがsum(1,2,...,c)=c(c+1)/2になります
h = c*(c+1)//2
print(h-b)
Buggy python submission (verdict: Runtime Error):
N = int(input())
m = 999
for i in range(N):
  N1 = sum(list(str(i+1)))
  N2 = sum(list(str(N - (i+1))))
  m = min(m, N1+N2)
print(m)

Fixed submission:
N = int(input())
m = 999
M = []
N1 = 0
N2 = 0
for i in range(N-1):
  L1 = list(str(i+1))
  N1 = 0
  N2 = 0
  for j in range(len(L1)):
    N1 += int(L1[j])
  L2 = list(str(N - (i+1)))
  for j in range(len(L2)):
    N2 += int(L2[j])
  M.append(N1+N2)
print(min(M))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
c = 0
for i in range(N+1):
  for j in range(i, N):
    if sum(A[i:j+1])==0:
      c += 1
print(c)

Fixed submission:
import collections
N = int(input())
A = list(map(int, input().split()))
S = [0]
for i in range(len(A)):
  S.append(A[i]+S[i])
L = list(collections.Counter(S).values())
s = 0
for l in L:
  s += int((l-1)*l//2)
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())
for i in range(A, B+1):
  if i-A<K or B-i<K:
    print(i)

Fixed submission:
A, B, K = map(int, input().split())
if K>(B-A)//2:
  for i in range(A, B+1):
    if i-A<K or B-i<K:
      print(i)
else:
  for i in range(A, A+K):
    print(i)
  for i in range(B-K+1, B+1):
    print(i)
Buggy python submission (verdict: Runtime Error):
import math

N, H = map(int, input().split())
Swords_a = []
Swords_b = []
amax = 0
for i in range(N):
  
  a, b = map(int, input().split())
  Swords_a.append(a)
  Swords_b.append(b)
  
ma = max(Swords_a)
sb = 0 # bのうち「maより大きい成分」の和

Swords_a = sorted(Swords_a)
Swords_b = sorted(Swords_b)

c = 0
k = 0

for i in range(N):
  if ma < Swords_b[i]:
    sb += Swords_b[i]
    c += 1
  if sb >= H:
    k = c
    どーん！
    break

if sb < H:
  print(c + math.ceil((H-sb)/ma))
else:
  #こっちでWAになる
  print(k)

Fixed submission:
import math

N, H = map(int, input().split())
Swords_a = []
Swords_b = []
for i in range(N):
  
  a, b = map(int, input().split())
  Swords_a.append(a)
  Swords_b.append(b)
  
ma = max(Swords_a)
sb = 0 # bのうち「maより大きい成分」の和

Swords_b = sorted(Swords_b, reverse = True)

c = 0
k = 0

for i in range(N):
  if ma < Swords_b[i]:
    sb += Swords_b[i]
    c += 1
  if sb >= H:
    k = c
    break

if sb < H:
  print(c + math.ceil((H-sb)/ma))
else:
  print(k)

Buggy python submission (verdict: Runtime Error):
import math

N, H = map(int, input().split())
Swords_a = []
Swords_b = []
amax = 0
for i in range(N):
  
  a, b = map(int, input().split())
  Swords_a.append(a)
  Swords_b.append(b)
  
ma = max(Swords_a)
sb = 0 # bのうち「maより大きい成分」の和

Swords_a = sorted(Swords_a)
Swords_b = sorted(Swords_b)

c = 0
k = 0

for i in range(N):
  if ma < Swords_b[i]:
    sb += Swords_b[i]
    c += 1
  if sb >= H:
    k = c
    break

if sb < H:
  print(c + math.ceil((H-sb)/ma))
else:
  ifeuah
  print(k)

Fixed submission:
import math

N, H = map(int, input().split())
Swords_a = []
Swords_b = []
for i in range(N):
  
  a, b = map(int, input().split())
  Swords_a.append(a)
  Swords_b.append(b)
  
ma = max(Swords_a)
sb = 0 # bのうち「maより大きい成分」の和

Swords_b = sorted(Swords_b, reverse = True)

c = 0
k = 0

for i in range(N):
  if ma < Swords_b[i]:
    sb += Swords_b[i]
    c += 1
  if sb >= H:
    k = c
    break

if sb < H:
  print(c + math.ceil((H-sb)/ma))
else:
  print(k)
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = [0 for i in range(N)]
L[0]=2
L[1]=1
for i in range(2, N):
  L[i] = L[i-1]+L[i-2]
print(L[N-1])

Fixed submission:
N = int(input())
L = [0 for i in range(N+1)]
L[0]=2
L[1]=1
for i in range(2, N+1):
  L[i] = L[i-1]+L[i-2]
print(L[N])
Buggy python submission (verdict: Runtime Error):
X, Y = map(input().split())
if X == Y:
  print("=")
elif X > Y:
  print(">")
else:
  print("<")

Fixed submission:
S = input()
X, Y = S[0], S[2]

if X == Y:
  print("=")
elif X > Y:
  print(">")
else:
  print("<")

Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split())
if X==Y:
  print("=")
elif X>Y:
  print(">")
else:
  print("<")

Fixed submission:
S = input()
X, Y = S[0], S[2]

if X == Y:
  print("=")
elif X > Y:
  print(">")
else:
  print("<")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
s = 0
for b in B:
  s += (sum(c > b for c in C) * sum(a < b for a in A))
print(s)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
s = 0

A = sorted(A)
B = sorted(B)
C = sorted(C)

ia = -1
ic = -1

for b in B:
  while True:
    if ia == N-1 or A[ia+1]>=b: 
      break
    ia += 1
  while True:
    if ic == N-1 or C[ic+1]>b:
      break
    ic += 1
  s += (ia+1)*(N-ic-1)
    
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
f = True
for h in range(1,3501):
  for n in range(1,3501):
    w_ = (-(h+n)/(h*n) + 4/N)
    if w_ > 0:
      w = (1/w_)
      if w%1 < 10E-8:
        print(h,n,int(w))
        f = False
        break
  if not f:
    break

Fixed submission:
N = int(input())
f = True
for h in range(1,3501):
  for n in range(1,3501):
    w_ = (-(h+n)/(h*n) + 4/N)
    if w_ > 0:
      w = (1/w_)
      if w%1 < 10E-8:
        print(h,n,int(w))
        f = False
        break
  if not f:
    break

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
f = True
for h in range(1,3501):
  for n in range(1,3501):
    w_ = (-(h+n)/(h*n) + 4/N)
    if w_ > 0:
      w = (1/w_)
      if w%1 == 0:
        print(h,n,int(w))
        f = False
        break
      if not f:
        break
  if not f:
    break

Fixed submission:
N = int(input())
f = True
for h in range(1,3501):
  for n in range(1,3501):
    w_ = (-(h+n)/(h*n) + 4/N)
    if w_ > 0:
      w = (1/w_)
      if w%1 < 10E-8:
        print(h,n,int(w))
        f = False
        break
  if not f:
    break
Buggy python submission (verdict: Runtime Error):
N = input()
f = True
L = len(N)
for i in range(N):
  if N[i] != N[L-1-i]:
    f = False
    break
if f:
  print("Yes")
else:
  print("No")

Fixed submission:
N = input()
f = True
L = len(N)
for i in range(L):
  if N[i] != N[L-1-i]:
    f = False
    break
if f:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
L = []
for a in A:
  L.append(a)
  L.reverse()
s = str(L[0])
for i in range(1, len(L)):
  s = s + " " + str(L[i])
print(s)

Fixed submission:
n = int(input())
A = list(input().split())
B = ""
m = n//2
if n%2 == 0:
  for i in range(m):
    B += A[n-1-2*i]
    B += " "
  for i in range(m):
    B += A[i*2]
    B += " "
else:
  for i in range(m+1):
    B += A[n-1-2*i]
    B += " "
  for i in range(m):
    B += A[i*2+1]
    B += " "
print(B[:-1])
Buggy python submission (verdict: Runtime Error):
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)) or ((x in group2) and (y in group2)) or ((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)) or ((x in group2) and (y in group2)) or ((x in group3) and (y in group3)):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
s1, s2, s3 = input().split()
s = s1[0]+s2[0]+s3[0]
print(upper(s))

Fixed submission:
s1, s2, s3 = input().split()
s = s1[0]+s2[0]+s3[0]
print(s.upper())
Buggy python submission (verdict: Runtime Error):
O = input()
E = input()
s = ""
if len(O)>len(S):
  for i in range(len(S)):
    s = s + O[i] + E[i]
  print(s + O[len(O)-1])
else:
  for i in range(len(S)):
    s = s + O[i] + E[i]
  print(s)

Fixed submission:
O = input()
E = input()
s = ""
if len(O)>len(E):
  for i in range(len(E)):
    s = s + O[i] + E[i]
  print(s + O[len(O)-1])
else:
  for i in range(len(E)):
    s = s + O[i] + E[i]
  print(s)
Buggy python submission (verdict: Runtime Error):
A B = map(int, input().split())
print((A+B)%24)


Fixed submission:
A, B = map(int, input().split())
print((A+B)%24)

Buggy python submission (verdict: Runtime Error):
A B = map(int, input().split())
print((A+B)%24)

Fixed submission:
A, B = map(int, input().split())
print((A+B)%24)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
M2 += N*2
print(min(M2//4, M//2))

Fixed submission:
N, M = map(int, input().split())
M2 = M + N*2
print(min(M2//4, M//2))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A == 1:
  A = 14
if B == 1:
  B = 14

if A == B:
  print("Draw")
elif A > B:
  print("Alice")
else:
  print("Bob")

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

if A == 1:
  A = 14
if B == 1:
  B = 14

if A == B:
  print("Draw")
elif A > B:
  print("Alice")
else:
  print("Bob")
Buggy python submission (verdict: Runtime Error):
N = input()
A = list(map(int, input()))
s = sum(A)
if s%2==0:
  print("YES")
else:
  print("NO")

Fixed submission:
N = input()
A = list(map(int, input().split()))
s = sum(A)
if s%2==0:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
print(max(A*B, C*D))

Fixed submission:
A, B, C, D = map(int, input().split())
print(max(A*B, C*D))
Buggy python submission (verdict: Runtime Error):
A op B = input().split()
if op == "+":
  print(int(A)+int(B))
else:
  print(int(A)-int(B))

Fixed submission:
A, op, B = input().split()
if op == "+":
  print(int(A)+int(B))
else:
  print(int(A)-int(B))
Buggy python submission (verdict: Runtime Error):
a, b, x = map(int input().split())
print(b//x - a//x)

Fixed submission:
a, b, x = map(int, input().split())
print(int(b//x - (a-1)//x))
Buggy python submission (verdict: Runtime Error):
import math
print(math.floor((math.sqrt(i+8*int(input()))-1)/2))

Fixed submission:
import math
N = int(input())
M = (math.ceil((math.sqrt(1+8*N)-1)/2))
for m in range(0,M):
  if M-m <= N:
    print(M-m)
    N -= M-m
  else:
    if N!=0:
      print(N)
    break
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
mod = 10**9+7

def cul(N,K):
  Ans = 0
  for i in range(N+1-K+1):
    t = (K+i-1)*(K+i)/2
    Ans += (K+i)*N - 2*t +1
  return(int(Ans%mod))

print(cul(N,K))

Fixed submission:
import math

a = int(input())
b = 2 * a * math.pi

print(str(b))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
a = list(map(int, input().split()))
s = sum(a)
b = np.array([a[0]])
for i in range(1,N-1):
    b = np.append(b, [b[i-1]+a[i]])
print(min(abs(2 * b -s )))

Fixed submission:
def calc(x,y):
    z = x+y
    b.append(z)
    return z
from functools import reduce
import numpy as np
N = int(input())
a = list(map(int, input().split()))
s = sum(a)
b = [a[0]]
reduce(calc ,a)
print(min(abs(2 * np.array(b[0:N-1]) -s )))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))
s = sum(a)
print(min([abs(2 * sum(a[0:i])-s) for i in range(1,N)]))

Fixed submission:
def calc(x,y):
    z = x+y
    b.append(z)
    return z
from functools import reduce
import numpy as np
N = int(input())
a = list(map(int, input().split()))
s = sum(a)
b = [a[0]]
reduce(calc ,a)
print(min(abs(2 * np.array(b[0:N-1]) -s )))
Buggy python submission (verdict: Runtime Error):
N = int(input())
s = [int(input()) for i in range(N)]
sums = sum(s)
others = filter(lambda x: x% 10, s)
if sums % 10:
    print(sums)
elif list(others) != []:
    print(sums-min(others))
else:
    print(0)

Fixed submission:
N = int(input())
s = [int(input()) for i in range(N)]
sums = sum(s)
others = list(filter(lambda x: x % 10, s))
if sums % 10:
    print(sums)
elif others != []:
    print(sums-min(others))
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = [int(input()) for i in range(N)]
sums = sum(s)
others = filter(lambda x: x% 10, s)
if sums % 10:
    print(sums)
elif others:
    print(sums-min(others))
else:
    print(0)

Fixed submission:
N = int(input())
s = [int(input()) for i in range(N)]
sums = sum(s)
others = list(filter(lambda x: x % 10, s))
if sums % 10:
    print(sums)
elif others != []:
    print(sums-min(others))
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import chain, combinations
def powerset(iterable):
    s = list(iterable)
    return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))

N = int(input())
s = [int(input()) for i in range(N)]
list1 = list(filter(lambda x: x % 10 ,map(sum,powerset(s))))
list1.append(0)
print(max(list1))

Fixed submission:
N = int(input())
s = [int(input()) for i in range(N)]
sums = sum(s)
others = list(filter(lambda x: x % 10, s))
if sums % 10:
    print(sums)
elif others != []:
    print(sums-min(others))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
M = N//2
if N % 2 == 1 and A.count(0) == 1 and all(A.count(i*2+2)==2 for i in range(M)):
    print((2 ** M) % (10**9+7))
elif N % 2 == 0 and all(A.count(i*2+1)==2 for i in range(M)):
    print((2 ** M) % (10**9+7))
else:
    print(0)

Fixed submission:
A, op, B = input().split()
if op == '+':
    print(int(A) + int(B))
if op == '-':
    print(int(A) - int(B))
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = list(map(int, input().split()))
print(sum([c%x==0 for c in range(a,b+1)]))

Fixed submission:
a, b, x = list(map(int, input().split()))
print(b//x-(a-1)//x)
Buggy python submission (verdict: Runtime Error):
h, a = input().split()
print(h // a)

Fixed submission:
h, a = input().split()
h = int(h)
a = int(a)
ans = h // a + (0 if h % a == 0 else 1)
print(ans)
Buggy python submission (verdict: Runtime Error):
as = map(int, input().split())
 
if sum(as) <= 21:
  print("win")
else:
  print("bust")

Fixed submission:
as_ = map(int, input().split())
 
if sum(as_) <= 21:
  print("win")
else:
  print("bust")

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

if as.sum() <= 21:
  print("win")
else:
  print("bust")

Fixed submission:
as_ = map(int, input().split())
 
if sum(as_) <= 21:
  print("win")
else:
  print("bust")
Buggy python submission (verdict: Runtime Error):
x, a = map(input().split())
if x < a:
  print(0)
else:
  print(10)

Fixed submission:
x, a = map(int, input().split())
if x < a:
  print(0)
else:
  print(10)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
p = list(map(int,input().split()))
ans0 = 0
for i in range(n-k+1):
    P = sum(p[i:i+k])
    if ans0 <= P:
        ans0 = P
        ans = (ans0+k*1)/2
print(ans)

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
P1 = sum(p[:k])
ans = P1
for i in range(k,n):
    P1 +=(p[i]-p[i-k])
    if ans < P1:
        ans = P1
print((ans+k)/2)
Buggy python submission (verdict: Runtime Error):
h,n = map(int,input().split())
a = list(map(int,input().split()))
x = max(a)
a.remove(x)
y = max(a)
if x+y >= h:
         print("Yes")
else:
         print("No")

Fixed submission:
h,n = map(int,input().split())
a = list(map(int,input().split()))
if sum(a)>= h:
         print("Yes")
else:
         print("No")

Buggy python submission (verdict: Runtime Error):
h,n = map(int,input().split())
a = list(map(int,input().split()))
x = max(a)
a.remove(x)
y = max(a)
print(h,x,y)
if x+y >= h:
         print("Yes")
else:
         print("No")

Fixed submission:
h,n = map(int,input().split())
a = list(map(int,input().split()))
if sum(a)>= h:
         print("Yes")
else:
         print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
h = list(map(int,input().split()))
if k > len(h):
    print(0)
else:
    for i in range(k):
        h.remove(max(h))
    print(sum(h))

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
H = sorted(h, reverse=True)
if k >= len(H):
    print(0)
if k<len(H):
    del H[:k]
    print(sum(H))
Buggy python submission (verdict: Runtime Error):
x,y,z = input().split()
a,b,c = input().split()
lst1 = [x,y,z]
lst2 = [a,b,c]
num = 0
for i in range(3):
    if lst1[i] == lst2[i]:
        num = num + 1
    else:
        num = num
print(num)

Fixed submission:
x = input()
y = input()
num = 0
for i in range(3):
    if x[i] == y[i]:
        num = num + 1
    else:
        num = num
print(num)
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
cnt = 0
for i in range(1,B+1):
    if  B == 1:
        cnt = 1
        a = 0
        break
    elif count == 0 and A >= B:
        cnt = 1
        a = 1
        break
    elif (A-1)*(i-1)+A >=B:
        a = i
        break
print(a)

Fixed submission:
A, B = map(int, input().split())
cnt = 1
while A*cnt-(cnt-1) < B:
  cnt +=1
print(cnt if B > 1 else 0)

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
cnt = 0
for i in range(1,B+1):
    if  B == 1:
        cnt = 1
        a = 0
        break
    elif count == 0 and A >= B:
        cnt = 1
        a = 1
        break
    elif (A-1)*(i-1)+A >= B:
        a = i
        break
print(a)

Fixed submission:
A, B = map(int, input().split())
cnt = 1
while A*cnt-(cnt-1) < B:
  cnt +=1
print(cnt if B > 1 else 0)

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
count = 0
for i in range(1,B):
    if count == 0 and A >= B:
        count = 1
        a = 1
        break
    if (A-1)*(i-1)+A >= B:
        a = i
        break
print(a)

Fixed submission:
A, B = map(int, input().split())
cnt = 1
while A*cnt-(cnt-1) < B:
  cnt +=1
print(cnt if B > 1 else 0)

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
count = 0
for i in range(1,B):
    if count == 0 and A == B:
        count = 1
        a = 1
        break
    if (A-1)*(i-1)+A >= B:
        a = i
        break
print(a)

Fixed submission:
A, B = map(int, input().split())
cnt = 1
while A*cnt-(cnt-1) < B:
  cnt +=1
print(cnt if B > 1 else 0)
Buggy python submission (verdict: Runtime Error):
n,d = map(int,input().split())
for i in range(n):
    if (d*2+1)*i >= n:
        a = i
        break
print(a)

Fixed submission:
n,d = map(int,input().split())
for i in range(1,n+1):
    if (d*2+1)*i >= n:
        a = i
        break
print(a)
Buggy python submission (verdict: Runtime Error):
n,l = map(int,input().split())
lst = 0
if l>=0:
    for i in range(1,n+1):
        lst+=l+(i-1)
    a = lst - l
if l < 0 and l+n >=0:
        for i in range(1,n+1):
            if l+i-1 == 0:
                lst+=l+(i-1)
                a = lst
if l+n <0:
    for i in range(1,n+1):
        lst+=l+(i-1)
        a = lst - (l+n-1)
print(a)

Fixed submission:
n,l = map(int,input().split())
lst = 0
if l>=0:
    for i in range(1,n+1):
        lst+=l+(i-1)
    a = lst - l
elif l < 0 and l+n-1 >=0:
        for i in range(1,n+1):
            lst+=l+(i-1)
        a = lst
elif l+n-1 <0:
    for i in range(1,n+1):
        lst+=l+(i-1)
    a = lst - (l+n-1)
print(a)
Buggy python submission (verdict: Runtime Error):
s = input()
f = int(s[0]+s[1])
l = int(s[2]+s[3])
if 1<= f <= 12:
    if 1<= l <= 12:
        ans = "AMBIGUOUS"
    else:
        ans = "MMYY"
if (f == 0) or (f>13):
    if 1<= l <= 12:
        ans = "YYMM"
    else:
        ans = "NA"
print(ans)

Fixed submission:
S = input()
ff = int(S[:2])
ll = int(S[2:])
if 0<ff<=12 and 0<ll<=12:
    print("AMBIGUOUS")
elif (ff == 0 or ff>12) and 0<ll<=12:
    print("YYMM")
elif 0<ff<=12 and (ll>12 or ll== 0):
    print("MMYY")
else:
    print("NA")
Buggy python submission (verdict: Runtime Error):
import math

R = int(input())
return 2 * math.pi * R

Fixed submission:
import math

R = int(input())
print(2 * math.pi * R)

Buggy python submission (verdict: Runtime Error):
import math
import fileinput

for line in fileinput.input():
    return 2 * math.pi * line

Fixed submission:
import math

R = int(input())
print(2 * math.pi * R)
Buggy python submission (verdict: Runtime Error):
#b
n,m=[int(i)for i in input().split()]

  arr=[int(i)for i in input().split()]
s=sum(arr)
if s>n:
  print(-1)
elif s==n:
  print(0)
else:
  print(n-s)



Fixed submission:
#b
n,m=[int(i)for i in input().split()]

arr=[int(i)for i in input().split()]
s=sum(arr)
if s>n:
  print(-1)
elif s==n:
  print(0)
else:
  print(n-s)

Buggy python submission (verdict: Runtime Error):
#b
n,m=[int(i)for i in input().split()]
arr=[]
for i in range(m):
  x=int(input())
  arr.append(x)
s=sum(arr)
if s>n:
  print(-1)
elif s==n:
  print(0)
else:
  print(n-s)



Fixed submission:
#b
n,m=[int(i)for i in input().split()]

arr=[int(i)for i in input().split()]
s=sum(arr)
if s>n:
  print(-1)
elif s==n:
  print(0)
else:
  print(n-s)

Buggy python submission (verdict: Runtime Error):
n_m = input().rstrip()

n = int(n_m[0])
m = int(n_m[1])

a_i = input().rstrip().split(' ')
a_i_list = [int(i) for i in a_i[m]]

finish_day = sum(a_i_list)

if n >= finish_day:
  ans = n - finish_day
  print(ans)
else:
  print('-1')


Fixed submission:
n_m = input().rstrip().split(' ')

n = int(n_m[0])
m = int(n_m[1])

a_i = input().rstrip().split(' ')
a_i_list = [int(i) for i in a_i[:m]]

finish_day = sum(a_i_list)

if n >= finish_day:
  ans = n - finish_day
  print(ans)
else:
  print('-1')