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

Fixed submission:
from decimal import Decimal
a,b = input().split()
c = int(a)*Decimal(b)
print(int(c))

Buggy submission (verdict: Runtime Error):
from decimal import Decimal
a,b = input().split()
c = (int(a)*(decimal(b)*1000000))/1000000
print(int(c//1)

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

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

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
if type(c) == int:
	s = c
s,t =c.split('.')
print(s)

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
if type(c) == int:
    s = c
s,t =c.split('.')
print(s)

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
if type(c) == 'int':
    s = c
s,t =c.split('.')
print(s)

Buggy submission (verdict: Runtime Error):
a,b = map(float,input().split())
c = a*b
s,t =c.split('.')
print(s)

Buggy submission (verdict: Runtime Error):
a,b = map(float,input().split())
c = a*b
s,sc =c.split('.')
print(s)

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
s,sc =c.split('.')
print(s)

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
print('{:1g}'.format(c))

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
print('{:g}'.format(c))

Buggy submission (verdict: Runtime Error):
a,b = input().split()
c = a*b
print('{:,}'.format(c))
Problem p02689 (python)

Fixed submission:
N,M = map(int,input().split())
tree = list(map(int,input().split())) #比較用
tree_sub = list(tree) #データの削除用
for i in range(M):
    a,b = map(int,input().split())
    if tree[a-1] > tree[b-1]:
        tree_sub[b-1] = 0
    elif tree[a-1] < tree[b-1]:
        tree_sub[a-1] = 0
    else:
        tree_sub[a-1] = 0
        tree_sub[b-1] = 0
print(len(tree_sub)-tree_sub.count(0))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
tree = list(map(int,input().split())) #比較用
tree_sub = tree #データの削除用
count = 0
for i in range(M):
    a,b = map(int,input().split())
    if (tree[a-1] > tree[b-1]) and (tree[b-1]== tree_sub[b-1]):
        tree_sub[b-1] = 0
    elif (tree[a-1] < tree[b-1]) and (tree[a-1] == tree_sub[a-1]):
        tree_sub[a-1] = 0
for i in range(M):
    if tree_sub[i] !=0:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
tree = list(map(int,input().split())) #比較用
tree_sub = tree #データの削除用
for i in range(M):
    a,b = map(int,input().split())
    if (tree[a-1] > tree[b-1]) and (int(tree[b-1]) in tree_sub):
        tree_sub[b-1] = 0
    elif (tree[a-1] < tree[b-1]) and (tree[a-1] in tree_sub):
        tree_sub[a-1] = 0
count = 0
for i in range(M):
    if tree_sub[i] != 0:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
tree = list(map(int,input().split())) #比較用
tree_sub = tree #データの削除用
for i in range(M):
    a,b = map(int,input().split())
    if (tree[a-1] > tree[b-1]) and (tree[b-1] in tree_sub):
        tree_sub.remove(b)
    elif (tree[a-1] < tree[b-1]) and (tree[b-1] in tree_sub):
        tree_sub.remove(a)
print(len(tree_sub))
Problem p02693 (python)

Fixed submission:
K = int(input())
A,B = map(int,input().split())
n = 1
while True:
    if A <= K*n and K*n <= B:
        print('OK')
        break
    elif K*n > B:
        print('NG')
        break
    n = n + 1

Buggy submission (verdict: Runtime Error):
K = int(input())
A,B = map(int,input().split())
n = 1
while True:
    if A <= K*n and K*n <= B:
        print('OK')
        break
    elif Kn > B:
        print('NG')
        break
    n = n + 1
Problem p02699 (python)

Fixed submission:
S,W = map(int,input().split())
if S <= W:
    print('unsafe')
else:
    print('safe')

Buggy submission (verdict: Runtime Error):
S,W = int(input().split())
if S <= W:
    print('unsafe')
print('safe')
Problem p02701 (python)

Fixed submission:
N = int(input())
biki = []
bise = {}
for i in range(N):
    S = input()
    biki.append(S)
bise=set(biki)
print(len(bise))

Buggy submission (verdict: Runtime Error):
N = int(input())
biki = {}
for i in range(N):
    S = input()
    biki.append(S)
print(len(biki))
Problem p02682 (python)

Fixed submission:
oneCard, zeroCard, miniusOneCard, getCardNum = map(int, input().split())

if oneCard >= getCardNum: print(getCardNum)
elif oneCard + zeroCard >= getCardNum: print(oneCard)
else: print(oneCard - (getCardNum - oneCard - zeroCard))

Buggy submission (verdict: Runtime Error):
if oneCard >= getCardNum: print(oneCard)
elif oneCard + zeroCard >= getCardNum: print(oneCard)
else: print(oneCard - (getCardNum - oneCard - zeroCard))
Problem p02771 (python)

Fixed submission:
a, b, c = map(int, input().split())
if a == b and a != c:
  print('Yes')
elif a == c and a != b:
  print('Yes')
elif b == c and a != c:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == b && a != c:
  print('Yes')
elif a == c && a != b:
  print('Yes')
elif b == c && a != c:
  print('Yes')
else:
  print('No')
Problem p02723 (python)

Fixed submission:
a = input()
a = list(a)
if a[2] == a[3] and a[4] ==a[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S =input()
S =int(S)
a = 0
b =0

while S>=500:
  S -=500
  a +=1
  g =S-(500*a)
  while g>=5:
    g -=5
    b +=1
h =1000*a +5*b
print(h)
Problem p02753 (python)

Fixed submission:
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Buggy submission (verdict: Runtime Error):
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
S = int(S)
g=input()
f = list(g)
if len(f) == S:
  h =set(f)
  k = list(h)
  if len(h)==1:
    print('No')
  else :
    print('Yes')
else:
  pass

Buggy submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :
  print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
print(f)
h =set(f)
k = list(h)
if len(k)==1:
  print('Yes')
else :
  print('No')

Buggy submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
h =set(f)
if len(h)==1:
  print('No')
else :
  print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
g=input()
f = list(g)
print(f)
h =set(f)
if len(h)=1:
  print('Yes')
else :
  print('No')
Problem p02759 (python)

Fixed submission:
N = input()
N = int(N)
if N%2==0:
  a = N//2
  print(a)
else:
  b = N//2 +1
  print(b)

Buggy submission (verdict: Runtime Error):
N = input()
if N % 2 == 0:
  print(N/2)
else:
  print(N//2 ＋1）
Problem p02771 (python)

Fixed submission:
A,B,C =map(int,input().split())
if A==B==C:
  print("No")
elif A!=B and B!=C and C!=A:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
A,B,C =map(int,input().split())
if A==B==c:
  print("No")
else:
  print("Yes")
Problem p02777 (python)

Fixed submission:
S,T= map(str,input().split())
A,B=map(int,input().split())
U =input()
if U==S:
  A-=1
elif U==T:
  B-=1
else:
  pass
print(A,B)

Buggy submission (verdict: Runtime Error):
S,T= map(strinput().split())
A=len(S)
B=len(T)
ptint(A,{},B)
U =input()
if U==S:
  A-=S
elif U==T:
  B-=1
else:
  pass
Problem p02676 (python)

Fixed submission:
a = int(input())
b = input()
if len(b) > a:
    print(b[:a]+'...')
else:
    print(b)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = input()
if len(a) < b:
    print(b[:a]+'...')
else:
    print(b)
Problem p02725 (python)

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

g = 0
for i in range(n-1):
  tmp = a[i+1]-a[i]
  if tmp > g:
    g = tmp
tmp = a[0] + (k - a[n-1])
if tmp > g:
  g = tmp

print(k-g)

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

g = 0
for i in range(n):
  tmp = a[i+1]-a[i]
  if tmp > g:
    g = tmp

print(k-g)
Problem p02629 (python)

Fixed submission:
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  n -= 1
  ans.append(n%26)
  n = n//26
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]],end='')

Buggy submission (verdict: Runtime Error):
n = int(input())
dic_items = {-1:'z',0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  ans.append(n%26)
  n = n//26
#print(ans)
for i in range(len(ans)):
  if ans[i] == 0:
    j = i+1
    if j < len(ans):
      ans[j] -= 1
      if j == len(ans)-1:
        ans[i] = 26
    else:
      ans.pop()
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]-1],end='')

Buggy submission (verdict: Runtime Error):
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  ans.append(n%26)
  n = n//26
for i in range(len(ans)):
  print(dic_items[ans[len(ans)-1-i]-1],end='')
Problem p02623 (python)

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

a, b = [0], [0]
for i in range(N):
        a.append(a[i]+A[i])
for i in range(M):
        b.append(b[i]+B[i])

ans, j = 0, M

for i in range(N+1):
        if a[i] > K:
                break
        while b[j] > K - a[i]:
                j -= 1
        ans = max(ans, i+j)

print(ans)

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

a, b = [0], [0]
for i in range(n):
        a.append(a[i]+A[i])
for i in range(m):
        b.append(b[i]+B[i])

ans, j = 0, M

for i in range(N+1):
        if a[i] > K:
                break
        while b[j] > K - a[i]:
                j -= 1
        ans = max(ans, i+j)

print(ans)

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

a, b = [0],[0]
for i in range(n):
        a.append(a[i]+A[i])
for i in range(m):
        b.append(b[i]+B[i])

ans, j = 0, M

for i in range(N+i):
        if a[i] > K:
                break
        while b[j] > K - a[i]:
                j -= 1
        ans = max(ans, i+j)

print(ans)

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0

a_sum = [0]
for i, minute in enumerate(a):
        a_sum.append(a_sum(i)+minute)
b_sum = [0]
for i, minute in enumerate(b):
        b_sum.append(b_sum(i)+minute)

B = m
ans_list = []

for i in a_sum:
        if i > k:
                ans_list.append(i)
                continue
        for j in b_sum[::-1]:
                if j <= k-i:
                        ans_list.append(i+B)
                        break
                elif j > k-i:
                        B -= 1

print(max(ans_list))
Problem p02622 (python)

Fixed submission:
a = input()
b = input()
u=zip(a,b)
x=[]
for i,j in u: 
    if i==j:
        x.append("") 
    else: 
        x.append("*")
print (x.count("*"))

Buggy submission (verdict: Runtime Error):
s, t = input().split()
x = zip(s, t)
y = []
for i, j in x:
    if i == j:
        y.append('')
    else:
        y.append('@')
print(y.count('@'))
Problem p02790 (python)

Fixed submission:
a,b = input().split()
a = int(a)
b = int(b)
string = ""
if a>b:
    for i in range(a):
        string = string+str(b)
elif b>a:
    for i in range(b):
        string = string+str(a)
else:
    for i in range(a):
        string =  string+str(a)
print(string)

Buggy submission (verdict: Runtime Error):
a, b = map.(int, input().split())
if(a==b):
    print("Yes")
    else:
	print("No")
Problem p02689 (python)

Fixed submission:
k = list(map(int, input().split()))
h = list(map(int, input().split()))
m = [list(map(int, input().split())) for i in range(k[1])]

import networkx as nx
G = nx.Graph()
for i in range(k[0]):
  G.add_node(i +1)
for i in m:
  G.add_edge(i[0],i[1])
re = 0
for i in list(G.nodes):
  if len(list(nx.all_neighbors(G, i))) != 0:
    max_height = max([h[x - 1] for x in list(nx.all_neighbors(G, i))])
    if h[i-1] > max_height:
      re +=1
  else:
    re +=1
print(re)

Buggy submission (verdict: Runtime Error):
k = list(map(int, input().split()))
h = list(map(int, input().split()))
m = [list(map(int, input().split())) for i in range(k[1])]

import networkx as nx

G = nx.Graph()
for i in range(len(k)):
  G.add_node(i +1)
for i in m:
  G.add_edge(i[0],i[1])

#print(k[0] - len(G.nodes()))
re = 0

for i in list(G.nodes):
  max_height = max([h[x - 1] for x in list(nx.all_neighbors(G, i))])
  if h[i-1] > max_height:
    re +=1
print(re + k[0] - len(G.nodes()))
Problem p02693 (python)

Fixed submission:
k = int(input())
l = list(map(int, input().split()))
if (l[1] - l[0]) >= k or l[0] % k == 0 or l[1] % k == 0:
  print("OK")
else:
  while l[0] != l[1]:
    l[0] += 1
    if l[0] % k == 0:
      print("OK")
      exit()
  print("NG")

Buggy submission (verdict: Runtime Error):
k = int(input())
l = list(map(int, input.split()))
if l[1] - l[0] >= k:
  print("OK")
elif l[0] == l[1]:
  if l[0] % k == 0:
    print("OK")
  else:
    print("NG")
else:
    print("NG")

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

if l[1] - l[0] >= k:
  print("OK")
elif l[0] == l[1]:
  if l[0] % k == 0:
    print("OK")
  else:
    print("NG")
else:
    print("NG")
Problem p02912 (python)

Fixed submission:
import heapq

N,M = list(map(int,input().split()))
A_tmp = [int(i) for i in input().split()]

#print(A_tmp)
A = [-i for i in A_tmp]

heapq.heapify(A)
#print(A)

for i in range(M):
  tmp = heapq.heappop(A)
  heapq.heappush(A, -(-tmp // 2))
  #print(A)

print(-sum(A))

Buggy submission (verdict: Runtime Error):
import heapq

N,M = list(map(int,input().split()))
A = [int(i) for i in input().split()]

A *= -1

heapq.heapify(A)

for i in range(M):
  tmp = heapq.heappop(A) * (-1)
  heapq.heappush(A, -(tmp // 2))

print(-sum(A))

Buggy submission (verdict: Runtime Error):
from numpy import array, sum, argmax
import heapq

N,M = list(map(int,input().split()))
A = [int(i) for i in input().split()]

A *= -1

heapq.heapify(A)

for i in range(M):
  tmp = heapq.heappop(A) * (-1)
  heapq.heappush(A, -(tmp // 2))

print(-sum(A))
Problem p02915 (python)

Fixed submission:
N = int(input())
print(N**3)

Buggy submission (verdict: Runtime Error):
N = int(input())
print(N^^3)
Problem p02959 (python)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]

if A[0] > B[0]:
  result = B[0]
  kurikoshi = 0
else:
  result = A[0]
  kurikoshi = B[0] - A[0]  

for i in range(1, N):
  if A[i] - kurikoshi > 0:
    nokori = A[i] - kurikoshi
    result += kurikoshi
    if nokori > B[i]:
      result += B[i]
      kurikoshi = 0
    else:
      result += nokori
      kurikoshi = B[i] - nokori
  elif A[i] - kurikoshi <= 0:
    result += A[i]
    kurikoshi = B[i]
if A[N] > kurikoshi:
  result += kurikoshi
  print(result)
else:
  result += A[N]
  print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]

power = 0
monster = 0
if A[0] > B[0]:
  reslut = B[0]
  kurikoshi = 0
else:
  reslut = A[0]
  kurikoshi = B[0] - A[0]  

for i in range(1, N):
  if A[i] - kurikoshi > 0:
    nokori = A[i] - kurikoshi
    result += kurikoshi
    if nokori > B[i]:
      result += B[i]
      kurikoshi = 0
    else:
      result += nokori
      kurikoshi = B[i] - nokori
  elif A[i] - kurikoshi <= 0:
    result += A[i]
    kurikoshi = B[i]
if A[N] > kurikoshi:
  result += kurikoshi
  print(result)
else:
  result += A[N]
  print(result)
Problem p02729 (python)

Fixed submission:
inp = input().split(" ")
N, M = int(inp[0]), int(inp[1])
# print(N, M)

def count(number):
  if number == 1 or number == 0:
    return 0
  else:
    return number * (number - 1) / 2

print(int(count(N) + count(M)))

Buggy submission (verdict: Runtime Error):
l = int(input())
A = input().split(" ")
unique = set(A)
def combination(number):
  if number <= 1:
    return 0
  else:
    return int(number * (number - 1) / 2)
def caluculate(string):
  data = memo[string]
  if data <= 1:
    return(0)
  else:
    return(data - 1) 
total = 0
memo = {}
for i in unique:
  times = A.count(i)
  memo[i] = times
  total += combination(times)
for i in A:
  print(total - caluculate(i))
Problem p03315 (python)

Fixed submission:
inp = input()
print(list(inp).count("+") - list(inp).count("-"))

Buggy submission (verdict: Runtime Error):
n, k = input().split()

q, mod = divmod(int(n) - 1, int(k) - 1)

if mod == 0:
  print(q)
else:
  print(q + 1)
Problem p02682 (python)

Fixed submission:
a, b, c, k = list(map(int, input().split()))
if k <= a:
	s = k * 1
elif k <= (a+b):
	s = a * 1
else:
	s = (a * 1) + ((k-(a+b)) * (-1))
print(s)

Buggy submission (verdict: Runtime Error):
a, b, c, k = int(input())
if a > k:
	print(sum(([1] * a)[:k]))
else:
	print(sum([1] * a))
Problem p02959 (python)

Fixed submission:
# coding: utf-8


def main():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    ans = 0

    for i in range(N):
        tmp = A[i] - B[i]
        if tmp < 0:
            ans += A[i]
            if A[i + 1] < -tmp:
                ans += A[i + 1]
                A[i + 1] = 0
            else:
                ans += -tmp
                A[i + 1] += tmp
        else:
            ans += B[i]

    print(ans)

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
# coding: utf-8


def main():
    N = int(input())
    A = list(map(int, input().split()))

    for i in range(N):
        b = int(input())
        tmp = A[i] - b
        if tmp < 0:
            ans += A[i]
            if A[i + 1] < -tmp:
                ans += A[i + 1]
                A[i + 1] = 0
            else:
                ans += -tmp
                A[i + 1] += tmp
        else:
            ans += b

    print(ans)

if __name__ == "__main__":
    main()
Problem p02989 (python)

Fixed submission:
# coding: utf-8

def main():
    N = int(input())
    d = sorted(list(map(int, input().split())))
    ans = 0
    if d[N // 2] != d[N // 2 - 1]:
        ans = d[N // 2] - d[N // 2 - 1]

    print(ans)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
# coding: utf-8

def main():
    N = int(input())
    d = sorted(list(map(int, input().split())))
    ans = 0
    if d[N / 2] != d[N / 2 - 1]:
        ans = d[N / 2] - d[N / 2 - 1]

    print(ans)


if __name__ == "__main__":
    main()
Problem p02711 (python)

Fixed submission:
N = input()
if '7' in N:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
if int(N[0]) == 7, or int(N[1]) == 7, int(N[2]) == 7:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
if N[0] == 7, or N[1] == 7, N[2] == 7:
  print('Yes')
else:
  print('No')
Problem p02771 (python)

Fixed submission:
A, B, C = map(int, input().split())
if A == B and B ==C:
  print('No')
elif A != B and B != C and C != A:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if A == B and B ==C:
  input('No')
elif A != B and B != C and C != A:
  input('No')
else:
  input('Yes')
Problem p02777 (python)

Fixed submission:
S, T = map(str, input().split())
A, B = map(int, input().split())
U = input()

a = A - 1
b = B - 1

if U == S:
  print('{} {}'.format(a,B))
else:
  print('{} {}'.format(A,b))

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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A,b))

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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))

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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))

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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))

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

a = A - 1
b = B - 1

if U == S:
  print({} {}.format(a,B))
else:
  print({} {}.format(A.b))
Problem p02829 (python)

Fixed submission:
A = int(input())
B = int(input())

if A == 1 and B == 2:
  print(3)
elif A == 1 and B == 3:
  print(2)
elif A == 2 and B == 1:
  print(3)
elif A == 2 and B == 3:
  print(1)
elif A == 3 and B == 1:
  print(2)
else:
  print(1)

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

if A = 1 and B = 2:
  print(3)
elif A = 2 and B = 3:
  print(1)
else:
  print(2)
Problem p02859 (python)

Fixed submission:
r = int(input())

print(int(r**2))

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

print(int(r**2))

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

print(r**2)
Problem p02860 (python)

Fixed submission:
N = int(input())
S = input()

if N % 2 == 1:
  print('No')
else:
  if S[0:N // 2] == S[N // 2:]:
    print('Yes')
  else:
    print('No')

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

if N % 2 == 1:
  print('No')
else:
  if S[0:(N // 2) + 1] = S[N // 2:]:
    print('Yes')
  else:
    print('No')
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()

if a>= 3200:
  print(s)
else:
  print('red')

Buggy submission (verdict: Runtime Error):
a = int(input())
s = input()

if a>= 3200:
  print(S)
else:
  print('red')
Problem p02987 (python)

Fixed submission:
s = input()
a = s[0]
b = s[1]
c = s[2]
d = s[3]

if a==b==c==d:
  print("No")
elif a==b and c==d:
  print("Yes")
elif a==c and b==d:
  print("Yes")
elif a==d and b==c:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s = input()
a = s[0]
b = s[1]
c = s[2]
d = s[3]

if a=b and c=d:
  print("Yes")
elif a=c and b=d:
  print("Yes")
elif a=d and b=c:
  print("Yes")
else:
  print("No")
Problem p03315 (python)

Fixed submission:
s = input()

a = s.count('+')
b = s.count('-')

x = a - b

print(x)

Buggy submission (verdict: Runtime Error):
s = input()

a = a.count('+')
b = a.count('-')

x = a - b

print(x)
Problem p03631 (python)

Fixed submission:
N = input()
N_reverse = N[::-1]

if N == N_reverse:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
N_reverse = N[::-1]

if N == N_reverse:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
N_reverse = N[::-1]

if N = N_reverse:
  print('Yes')
else:
  print('No')
Problem p03803 (python)

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

if a == 1:
  if b == 1:
    print('Draw')
  else:
    print('Alice')
else:
  if b == 1:
    print('Bob')
  elif a > b:
    print('Alice')
  elif a == b:
    print('Draw')
  else:
    print('Bob')

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

if a == 1:
  if b == 1:
    print('Draw')
  else:
    print(Alice)
else:
  if b == 1:
    print('Bob')
  elif a > b:
    print('Alice')
  elif a == b:
    print('Draw')
  else:
    print('Bob')