Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02612 (python)

Fixed submission:
num = int(input())
if num % 1000 == 0:
  print(0)
else:
  print(1000 - num % 1000)

Buggy submission (verdict: Runtime Error):
# python template for atcoder1 
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

print(input % 1000)
Problem p02613 (python)

Fixed submission:
n = int(input())
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
  s = input()
  dic[s] += 1
  
for s in ('AC', 'WA', 'TLE', 'RE'):
  print(s + ' x ' + str(dic[s]))

Buggy submission (verdict: Runtime Error):
import collections
# python template for atcoder
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

n = int(input())
arr = list(map(int, input().split()))
dic = collections.Counter(arr)

for s in ('AC', 'WA', 'TLE', 'RE'):
  print(s + ' x ' + str(dic[s]))
Problem p02612 (python)

Fixed submission:
x=int(input(''))
if x%1000==0:
  print(0)
else:
  print(1000-x%1000)

Buggy submission (verdict: Runtime Error):
x=int(input(''))
if x%1000=0:
  print(0)
else:
  print(1000-x%1000)
Problem p02613 (python)

Fixed submission:
x=int(input(''))
y=[0]*x
for i in range(x):
  y[i]=input('')
a=0
w=0
t=0
r=0
for i in range(x):
  if y[i]=='AC':
    a=a+1
  elif y[i]=='WA':
    w=w+1
  elif y[i]=='TLE':
    t=t+1
  else:
    r=r+1
print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(a,w,t,r))

Buggy submission (verdict: Runtime Error):
x=int(input(''))
y=[0]*x
for i in range(x):
  y[i]=input('')
a=0
w=0
t=0
r=0
for i in range(x):
  if y[i]==AC:
    a=a+1
  elif y[i]==WA:
    w=w+1
  elif y[i]==TLE:
    t=t+1
  else:
    r=r+1
print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {r}'.format(a,w,t,r))
Problem p02675 (python)

Fixed submission:
N = input()
if N[-1] in ('0','1','6','8'):
    print('pon')
elif N[-1] == '3':
    print('bon')
else:
    print('hon')

Buggy submission (verdict: Runtime Error):
N = input()
if n[-1] in ('0','1','6','8'):
	print('pon')
else if n[-1] =="3":
	print('bon')
else:
	print("bon")
Problem p02741 (python)

Fixed submission:
a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=int(input())

print(a[k-1])

Buggy submission (verdict: Runtime Error):
alist=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k=input()

print(alist[k-1])
Problem p02923 (python)

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

cnt = [0]*n

for i in reversed(range(n-1)):
  if h[i] >= h[i+1]:
    cnt[i] += cnt[i+1] + 1
    
print(max(cnt))

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

cnt = 0

for i in range(N):
  if H[i] >= H[1+i]:
    cnt += 1

print(cnt)
Problem p02952 (python)

Fixed submission:
n = int(input())
ans = 0

for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n=input()
ans=0
for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n=input()
ans=0
for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
      ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
n=input()
ans=0

for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
      ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N=input()
ans=0

for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
      ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
ans=0

for i in range(1,n):
  if len(str(i)) % 2 == 1:
      ans += 1
print(ans)
Problem p02957 (python)

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

K=abs(A+B)/2

if abs(A+B) % 2 == 0:
  print(int(K))
else:
  print("IMPOSSIBLE")

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

K=abs(A+B)/2

if abs(A+B) % 2 == 0;
	print(K)
else;
	print("IMPOSSIBLE")

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

K=(B-A)/2

if (B-A) % 2 == 0;
	print(K)
else;
	print("IMPOSSIBLE")
Problem p02958 (python)

Fixed submission:
N=int(input())
p=list(map(int,input().split()))

sort_p=sorted(p)
cnt=0

#i,jにpとソートしたpを代入して比較
for i,j in zip(p,sort_p):
  if i != j:
    cnt += 1

if cnt <= 2:
  print("YES")
else:
  print("NO")

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

if P[0] < P[N-1] and P[N-1] > P[2] and P[N-2] > P[0]:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
N=int(input())
P=[int(input()) for i in range(N)]

if P[0] > P[N-1] and P[N-1] < P[2] and P[3] < P[0]:
  print("YES")
else:
  print("NO")
Problem p02971 (python)

Fixed submission:
N = int(input())
A = [int(input()) for i in range(N)]

x = sorted(A)

for i in range(N):
  if A[i] == x[N-1]:
    print(x[N-2])
  else:
    print(x[N-1])

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(input()) for i range(N)]

x = sorted(A)

for i in range(N):
  if A[i] == x[N-1]:
    print(x[N-2])
  else:
    print(x[N-1])

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(input()) for i range(N)]

x=sorted(A)

for i in range(N):
  if A[i] == x[N-1]:
    print(x[N-2])
  else:
    print(x[N-1])
Problem p02993 (python)

Fixed submission:
s=list(input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if a==b or b==c or c==d:
  print("Bad")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a,b,c,d=int(input().split())
if a==b or b==c or c==d:
  print("Bad")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
s=list(map(int,input().split()))
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if a==b or b==c or c==d:
  print("Bad")
else:
  print("Yes")
Problem p03005 (python)

Fixed submission:
n,k=map(int,input().split())
if k == 1:
  print(0)
else:
  print(n-k)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
if k == 1:
  print(0)
else:
  print(x-y)
Problem p03029 (python)

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

apple_cut = A * 3

apple_pie = (apple_cut + P) /2
                 
print(int(apple_pie))

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

apple_cut = A * 3

apple_pie = (apple_cut + P) /2
                 
print(int(apple_pie))

Buggy submission (verdict: Runtime Error):
A,P = map(int(input(),split())

apple_cut = A * 3

apple_pie = (apple_cut + P) /2
                 
print(int(apple_pie))

Buggy submission (verdict: Runtime Error):
A,P = map(int(input(),split())

apple_cut = A * 3

apple_pie = (apple_cut + P) /2
                 
print(apple_pie)

Buggy submission (verdict: Runtime Error):
apple,apple_piece = map(int(input(),split())

apple_cut = apple * 3

apple_pie = (apple_cut + apple_piece) /2
                 
print(apple_pie)
Problem p03035 (python)

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

if A >= 13:
	print(B)
    
elif 6 <= A <= 12:
	print(B // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A >= 13:
	print(B)
    
elif 6 <= A <= 12:
	print(B//2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A >= 13:
	print(B)
    
elif 6 <= A <= 12:
	print(B // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()

if A >= 13:
	print(B)
    
elif 6 <= A <= 12:
	print(B // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
age = input()
fee = input()

if age >= 13:
	print(fee)
    
elif 6 <= age <= 12:
	print(fee // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
age = map(int,input())
fee = map(int,input())

if age >= 13:
	print(fee)
    
elif 6 <= age <= 12:
	print(fee // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
age = int(input())
fee = int(input())

if age >= 13:
	print(fee)
    
elif 6 <= age <= 12:
	print(fee // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
age = input()
fee = input()

if age >= 13:
	print(fee)
    
elif 6 <= age <= 12:
	print(fee // 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
age = int(input())
fee = int(input())

if age > 13:
	print(fee)
    
elif 6 <= age <= 12:
	print(fee / 2)

else:
	print(0)

Buggy submission (verdict: Runtime Error):
age = 12
fee = 1000

if age > 13;
	print(fee)
else if 6 <= age <= 12;
	print(fee / 2)
else;
	print(0)

Buggy submission (verdict: Runtime Error):
age = 12
fee = 1000

if age > 13;
	print(fee)
else;
	print(fee / 2)

Buggy submission (verdict: Runtime Error):
if age > 13;
	print(fee)
else;
	print(fee / 2)
Problem p03059 (python)

Fixed submission:
a,b,t=map(int,input().split())
ans=int((t+0.5)/a)
print(ans*b)

Buggy submission (verdict: Runtime Error):
a,b,t=map(int,input().split())
int(ans)=(t+0.5)/a*b
print(ans)
Problem p03060 (python)

Fixed submission:
N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))

ans=0

for i in range(N):
  ans += max(0,V[i] - C[i])
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))

ans=0

for i in range(N):
  ans += max(0,V[i] - C[i]):
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
V=[int(input().split()) for i in range(N)]
C=[int(input().split()) for i in range(N)]

for i in range(N):
  if V[i] > C[i]:
    ans += V[i] - C[i]:
    print(ans)
Problem p03085 (python)

Fixed submission:
a=input()
s={"A":"T","T":"A","C":"G","G":"C"}
print(s[a])

Buggy submission (verdict: Runtime Error):
a=input()
s={"A":"T","T":"A","C":"G","G":"C"}
print(a[s])

Buggy submission (verdict: Runtime Error):
s={"A":"T","T":"A","C":"G","G":"C"}
a=input()
print(a[s])
Problem p03101 (python)

Fixed submission:
H,W=map(int,input().split())
h,w=map(int,input().split())

ans=(H-h)*(W-w)

print(ans)

Buggy submission (verdict: Runtime Error):
H,W=input().split()
h,w=input().split()

ans=(H-h)*(W-w)

print(ans)

Buggy submission (verdict: Runtime Error):
H,W=int(input().split())
h,w=int(input().split())

ans=(H-h)*(W-w)

print(ans)
Problem p03106 (python)

Fixed submission:
a,b,k=map(int,input().split())
ans=[]

for i in range(1,min(a,b)+1):
  if a % i == 0 and b % i == 0:
    ans.append(i)

print(ans[-k])

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split())
ans=[]

if i in range(1,min(a,b)+1):
  if a % i == 0 and b % i == 0:
    ans.append(i)

print(ans[-k])
Problem p03109 (python)

Fixed submission:
s=input()
if s <= "2019/04/30":
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
import datetime

s=input()
h=datetime.date(2019,4,30)

if s <= h:
  print("Heisei")
else:
  print("TBD")

Buggy submission (verdict: Runtime Error):
s=input()
if s <= 2019/04/30:
  print("Heisei")
else:
  print("TBD")
Problem p03136 (python)

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
l=sorted(l)

if l[-1] < sum(l[:-1]):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N=int(input())
l=list(map(int,input().split()))
l=sorted(l)

if l[-1] < sum([:-1]):
  print("Yes")
else:
  print("No")
Problem p03210 (python)

Fixed submission:
x=int(input())
if x == 7 or x == 5 or x == 3:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x=int(input())
if x = 7 or x = 5 or x = 3:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x=int(input())
if x = 7 and x = 5 and x = 3:
  print("YES")
else:
  print("NO")
Problem p03238 (python)

Fixed submission:
N=int(input())

if N == 1:
  print("Hello World")
elif N == 2:
	A=int(input())
	B=int(input())
	print(A+B)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
B=int(input())

if N == 1:
  print("Hello World")
elif N == 2:
  print(A+B)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
B=int(input())

if N == 1:
  print("Hello World")
else:
  print(A+B)
Problem p03260 (python)

Fixed submission:
A,B=map(int,input().split())
if A * B % 2 == 1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A * B % 2 == 1:
  pritn("Yes")
else:
  print("No")
Problem p03264 (python)

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

Buggy submission (verdict: Runtime Error):
k=int(input())
print((k/2)∗((k+1)/2))

Buggy submission (verdict: Runtime Error):
K=int(input())
print((k/2)*((k+1)/2))
Problem p03316 (python)

Fixed submission:
n=input()

if (int(n) % sum(map(int,list(n))) == 0):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())

if (n % sum(map(int,list(n))) == 0):
  print("Yes")
else:
  print("No")
Problem p03328 (python)

Fixed submission:
a,b=map(int,input().split())
print(((b-a)**2-a-b)//2)

Buggy submission (verdict: Runtime Error):
a.b=map(int,input().split())
print((b-a)*(b-a+1)/2-b)
Problem p03399 (python)

Fixed submission:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
print(min(A,B)+min(C,D))

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
c=int(input())
D=int(input())
print(min(A,B)+min(C,D))

Buggy submission (verdict: Runtime Error):
s=[int(input()) for i in range(4)]
print(s.sort(s[0]+s[1]))
Problem p03415 (python)

Fixed submission:
a=input()
b=input()
c=input()

print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
a,b,c=map(str,input().split())
d,e,f=map(str,input().split())
g,h,q=map(str,input().split())

print(a+e+q)
Problem p03424 (python)

Fixed submission:
n=int(input())
s=list(map(str,input().split()))

if s.count("Y") >= 1:
  print("Four")
else:
  print("Three")

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(map(input().split()))

if len(s) == 4:
  print("Four")
else:
  print("Three")
Problem p03434 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)

alice = sum(a[::2])
bob = sum(a[1::2])

print(alice - bob)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=map(int,input().split())
sort_a=sorted(a)

alice = sum(sort_a[::2])
bob = sum(a[1::2])

print(alice - bob)
Problem p03447 (python)

Fixed submission:
x=int(input())
a=int(input())
b=int(input())
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
x,a,b=map(int,input().split())
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
A,B,X=map(int,input().split())
print((X - A) % B)

Buggy submission (verdict: Runtime Error):
A,B,X=map(int,input().split())
print((X-A)%B)
Problem p03448 (python)

Fixed submission:
A=int(input())
B=int(input())
C=int(input())
X=int(input())
cnt=0

for i in range(A + 1):
  for j in range(B + 1):
    for k in range(C + 1):
      if (500*i + 100*j + 50*k) == X:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
X=int(input())
cnt=0

for i in range(A + 1):
  for j in range(B + 1):
    for k in range(C + 1):
      if (500*i + 100*j + 50*k) == X
      cnt += 1

print(cnt)
Problem p03470 (python)

Fixed submission:
n=int(input())
d=[int(input()) for _ in range(n)]

print(len(set(d)))

Buggy submission (verdict: Runtime Error):
n=int(input())
d=[int(input()) for i in range(n)]
print(len(set(d))
Problem p03477 (python)

Fixed submission:
A,B,C,D=map(int,input().split())
L=A+B
R=C+D
if L > R:
  print("Left")
elif L == R:
  print("Balanced")
elif L < R:
  print("Right")

Buggy submission (verdict: Runtime Error):
A,B,C,D=map(int,input().split())
L=A+B
R=C+D

if L > R:
  print("Left")
elif L = R:
  print("Balanced")
elif L < R:
  print("Right")
Problem p03494 (python)

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

cnt=0

while all(a % 2 == 0 for a in A):
	A = [a /2 for a in A]
	cnt += 1

print(cnt)

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

cnt=0

while all(a % 2 == 0 for a in A)
	A = [a /2 for a in A]
	cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(input().split()))

cnt=0

while all(a % 2 == 0 for a in A)
	A = [a /2 for a in A]
	cnt += 1

print(cnt)
Problem p03547 (python)

Fixed submission:
x,y=input().split()

if x<y:
  print("<")
elif x>y:
  print(">")
else:
  print("=")

Buggy submission (verdict: Runtime Error):
x,y=input().split()

if x==y:
  print("=")
elif a>b:
  print(">")
else:
  print("<")

Buggy submission (verdict: Runtime Error):
x,y = input().split()

if x==y:
  print("=")
elif a>b:
  print(">")
else:
  print("<")
Problem p03548 (python)

Fixed submission:
x,y,z=map(int,input().split())

print((x-z)//(y+z))

Buggy submission (verdict: Runtime Error):
x,y,z=map(int,input().split())
cnt=0

for i in range(49999):
  if (y*i) + z+(i+1) <= x
  cnt += 1
  
print(cnt)
Problem p03555 (python)

Fixed submission:
x = input()
y = input()

if x[0]==y[2] and x[1]==y[1] and x[2]==y[0]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
x = list(map(input().split()))
y = list(map(input().split()))

if x[0]==y[2] and x[1]==y[1] and x[2]==y[0]:
  print("YES")
else:
  print("NO")
Problem p03556 (python)

Fixed submission:
import math
N=int(input())
n=math.sqrt(N)

print(int(n)**2)

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
n=math.sqart(N)

print(int(n)**2)

Buggy submission (verdict: Runtime Error):
import math
N=int(input())
n=math.sqart(n)

print(int(n)**2)
Problem p03564 (python)

Fixed submission:
n=int(input())
k=int(input())

ans=1

for i in range(n):
  if ans*2 < ans+k:
    ans = ans*2
  else:
    ans = ans+k

print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
k=int(input())

ans=1

for i in range(1,n):
  if ans*2 < ans+k:
    ans = ans*2
  else:
    ans = ans+k

print(ans)
Problem p03605 (python)

Fixed submission:
x=input()

if x[0]=="9" or x[1]=="9":
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x=input().split("")

if x[0]==9 or x[1]==9:
  print("Yes")
else:
  ("No")

Buggy submission (verdict: Runtime Error):
x=list(int,input().split())

if x[0]==9 or x[1]==9:
  print("Yes")
else:
  ("No")
Problem p03609 (python)

Fixed submission:
X,t=map(int,input().split())

if X-t >= 0:
  print(X-t)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
X,t=map(int,input().split())

if X-t >= o:
  print(X-t)
else:
  print(0)
Problem p03636 (python)

Fixed submission:
s=input()
n=len(s)
print(s[0]+str(n-2)+s[n-1])

Buggy submission (verdict: Runtime Error):
s=input()
n=len(s)
print(s[0]+str[n-2]+s[n-1])
Problem p03657 (python)

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

if A%3==0 or B%3==0 or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")

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

if A%3==0 or B%3== or (A+B)%3==0:
  print("Possible")
else:
  print("Impossible")
Problem p03693 (python)

Fixed submission:
r,g,b=map(int,input().split())
ans=100*r+10*g+b

if ans % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
r,g,b=map(int,input().split()))
ans=100*r+10*g+b

if ans % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
l=list(map(int,input().split()))
l="".join([int(n) for n in l])

if l % 4 == 0:
  print("YES")
else:
  print("NO")
Problem p03697 (python)

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

if A+B < 10:
  print(A+B)
else:
  print("error")

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

if A+B < 10:
  print(A+B)
else:
  print("error")
Problem p03711 (python)

Fixed submission:
a = [0,1,3,1,2,1,2,1,1,2,1,2,1]
x,y = map(int,input().split())

if a[x] == a[y]:
	print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = [0,1,3,1,2,1,2,1,1,2,1,2,1]
x,y = map(int,input().split())

if x[a] == y[a]:
	print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = [0,1,3,1,2,1,2,1,1,2,1,2,1]
x,y = map(int,input().split())

if x[a] == y[a]:
	print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = [0,1,3,1,2,1,2,1,1,2,1,2,1]
x,y = map(int(input().split())

if x[a] == y[a]:
	print("Yes")
else:
    print("No")
Problem p03729 (python)

Fixed submission:
a,b,c=input().split()

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()

if a[len(a-1)] == b[0] and b[len(b-1)] == c[0]:
  print("YES")
else:
  print("NO")
Problem p03777 (python)

Fixed submission:
a,b=input().split()

if a == b:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
a,b=input().split()

if a == "H":
  print("H")
else if a == "D" and b == "H":
  print("D")
else:
  print("H")
Problem p03844 (python)

Fixed submission:
A=input()
print(eval(A))

Buggy submission (verdict: Runtime Error):
A,c,B=input().split()

if c == "+":
  print(A+B)
else:
  print(A-B)
Problem p03943 (python)

Fixed submission:
a,b,c=map(int,input().split())

if a == b+c or b == a+c or c == a+b:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=sorted(map(int,input().split()))

if a == b+c;
	print("Yes")
else:
	print("No")
Problem p03997 (python)

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
print((a+b)*h//2)

Buggy submission (verdict: Runtime Error):
a=int(input()
b=int(input()
h=int(input()
print((a+b)*h//2)

Buggy submission (verdict: Runtime Error):
a,b,h=map(int,inpuut().split())
print((a+b)*h/2)

Buggy submission (verdict: Runtime Error):
a,b,h=map(int,inpuut().split())
print((a+b)*2/2)
Problem p04011 (python)

Fixed submission:
N,K,X,Y=[int(input()) for i in range(4)]

if N >= K:
  print(Y*(N-K) + K*X)
else:
  print(N*X)

Buggy submission (verdict: Runtime Error):
N,K,X,Y=map(int,input().split())

if N >= K:
  print((N-K)*Y + (K*X))
else:
  print(N*X)
Problem p02630 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ma = [0] * (100000 + 1)

for i in range(N):
    ma[A[i]] += 1

Q = int(input())

s = sum(A)

for i in range(Q):
    b, c = map(int, input().split())
    diff = c * ma[b] - ma[b] * b
    ma[c] += ma[b]
    ma[b] = 0
    s += diff
    print(s)

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

Q = int(input())

s = sum(A)

for i in range(Q):
    b, c = map(int, input().split())
    diff = c - A[b - 1]
    A[b - 1] = c
    s += diff
    print(s)

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

Q = int(input())

s = sum(A)

for i in range(Q):
    b, c = map(int, input().split())
    diff = c - A[b - 1]
    A[b - 1] = c
     diff
    print(s)
Problem p02631 (python)

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

AA = [0] * (N)
for i in range(N):
    AA[i] = list(format(A[i], 'b').zfill(42))

ans = [0] * 42
ma = 0
for i in range(N):
    AA[i].reverse()
    for j in range(len(AA[i])):
        ma = max(ma, j)
        ans[j] += int(AA[i][j])

ret = []
for i in range(N):
    temp = 0
    for j in range(ma):
        if (ans[j] + int(AA[i][j])) & 1 == 1:
            temp += 1 << j

    ret.append(temp)

print(*ret)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
AA = [0] * (N)
for i in range(N):
    AA[i] = list(format(A[i], 'b'))

ans = [0] * 22
for i in range(N):
    AA[i].reverse()
    for j in range(len(AA[i])):
        ans[j] += int(AA[i][j])

ret = []
for i in range(N):
    temp = 0
    for j in range(len(AA[i])):
        if (ans[j] - int(AA[i][j])) % 2 == 1:
            temp += 1 << j

    ret.append(temp)

print(*ret)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
AA = [0] * (N)
for i in range(N):
    AA[i] = list(format(A[i], 'b'))

ans = [0] * 20
for i in range(N):
    AA[i].reverse()
    for j in range(len(AA[i])):
        ans[j] += int(AA[i][j])

ret = []
for i in range(N):
    temp = 0
    for j in range(len(AA[i])):
        if (ans[j] - int(AA[i][j])) % 2 == 1:
            temp += 1 << j

    ret.append(temp)

print(*ret)