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

Fixed submission:
n,a,b=map(int,input().split())
if n>1 and b>=a or n==1 and a==b: 
    print ((n-2)*(b-a)+1);
else:
    print ("0");

Buggy submission (verdict: Runtime Error):
s=input().split();n,a,b=int(s[0]),int(s[1]),int(s[2])
if a>b:
    print(0)
elif n=1:
    if a==b:
        print(1)
    else:
        print(0)
else:
    print((a-b)*(n-2)+1)

Buggy submission (verdict: Runtime Error):
n=input().slipt()
print(int(n[2]*(n[0]-2)-(n[1]*n[0]-2)+1))

Buggy submission (verdict: Runtime Error):
n=input()
a=input()
b=input()
print(int(b*(n-2)-(a*n-2)+1))
Problem p03705 (python)

Fixed submission:
n,anb,b=map(int,input().split()) 
if n>1 and b>=anb or n==1 and anb==b: 
    print ((n-2)*(b-anb)+1); 
else:
    print ("0");

Buggy submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())
print((b - a) * (n - 2) + 1)

Buggy submission (verdict: Runtime Error):
#include<iostream>
using namespace std;
int main()
{
    long long n,a,b;
    cin>>n>>a>>b;
    if(n>1&&b>=a||n==1&&a==b)
        cout<<(n-2)*(b-a)+1<<endl;
    else
        cout<<0<<endl; 
 }

Buggy submission (verdict: Runtime Error):
c=int(input()),a=int(input()),b=int(input())
print((a+b*c-b)-(a*c-a+b)+1)

Buggy submission (verdict: Runtime Error):
#include<iostream>
#define ll long long
using namespace std;
ll n,a,b;
int main(){
    cin>>n>>a>>b;
    cout<<(b*(n-2)-a*(n-2)+1);
    return 0;
}
Problem p03073 (python)

Fixed submission:
s = list(input())
first_zero = []
first_one = []
s_size = len(s)
for i in range(s_size):
    if i % 2 == 0:
        first_zero.append("0")
        first_one.append("1")
    else:
        first_zero.append("1")
        first_one.append("0")

count_zero = 0
count_one = 0

for index,number in enumerate(s):
    if number == first_zero[index]:
        pass
    else:
        count_zero += 1

    if number == first_one[index]:
        pass
    else:
        count_one += 1

if count_one > count_zero:
    print(count_zero)
else:
    print(count_one)

Buggy submission (verdict: Runtime Error):
import sys
n,k = map(str, input().split())
s = list(str(input()))

zero_count_list = []
zero_count = 0
one_count_list = []
one_count = 0
s_size = len(s)

for index, i in enumerate(s):
    if i == "0":
        zero_count += 1
    else:
        if zero_count != 0:
            zero_count_list.append(zero_count)
        zero_count = 0
    if index == s_size - 1:
        if zero_count != 0:
            zero_count_list.append(zero_count)

for index, i in enumerate(s):
    if i == "1":
        one_count += 1
    else:
        if one_count != 0:
            one_count_list.append(one_count)
        one_count = 0
    if index == s_size - 1:
        if one_count != 0:
            one_count_list.append(one_count)
if k => len(zero_count_list):
    print(s_size)
    sys.exit(0)
Problem p03327 (python)

Fixed submission:
N = int(input())

if (N >= 1) and (N <= 999):
    print('ABC')
else:
    print('ABD')

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

if (N >= 1) & (N <= 999)
    print('ABC')
else:
    print('ABD')
Problem p02835 (python)

Fixed submission:
A1,A2,A3 = (int(x) for x in input().split())
if A1 + A2 + A3 < 22:
    print('win')
else :
    print('bust')

Buggy submission (verdict: Runtime Error):
A1 = input()
A2 = input()
A3 = input()

if A1 + A2 + A3 < 22:
    print('win')
else :
    print('bust')
Problem p02699 (python)

Fixed submission:
s,w = map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")

Buggy submission (verdict: Runtime Error):
s,w = map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe)
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
S,W = map(int,input().split)
if S >= W:
  print('unsafe')
else:
  print('safe')
Problem p02711 (python)

Fixed submission:
N = list(input())
for i in range(3):
  if N[i] == "7":
    print("Yes")
    break
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = list(input())
for i in range(2):
  if N[i]=7:
    print("Yes")
  break
else:
  print("No")
Problem p02723 (python)

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

Buggy submission (verdict: Runtime Error):
S = list(input())
if S[2] == S[3]　and S[4] == S[5]:
    print("Yse")
else:
    print("No")
Problem p02693 (python)

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

nK = K
n = 1
ans = "NG"
while(nK<=B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)

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

nK = K
n = 1
ans = "NG"
while(nK=<B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)
Problem p02707 (python)

Fixed submission:
import collections
N = int(input())
A_list = list(map(int, input().split()))
ans = collections.Counter(A_list)
for i in range(1, N+1):
	print(ans[i])

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
A_list = list(map(int, input().split()))
index = np.arange(1, N+1)
ans = ["{}\n".format(i) for A_list.count(i) in range(1, N+1)]
print(ans)
Problem p02984 (python)

Fixed submission:
N = int(input())
x = list(map(int, input().split()))
y = [0] * N

odd = sum([n for i, n in enumerate(x) if i % 2 == 1])
even = sum([n for i, n in enumerate(x) if i % 2 == 0])
y[0] = even - odd

for i in range(N-1):
  y[i+1] = 2 * x[i] - y[i]


str_y = map(str, y)
output = " ".join(str_y)
print(output)

Buggy submission (verdict: Runtime Error):
N = int(input())
x = list(map(int, input().split()))
y = [0] * N

odd = sum([n for i, n in enumerate(shifted_x) if i % 2 == 1])
even = sum([n for i, n in enumerate(shifted_x) if i % 2 == 0])
y[0] = even - odd

for i in range(N-1):
  y[i+1] = 2 * x[1] - y[i]


str_y = map(str, y)
output = " ".join(str_y)
print(output)
Problem p02699 (python)

Fixed submission:
a,b = map(int,input().split())
if b >= a:
    print("unsafe")
elif a > b:
    print("safe")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if b > a:
    priant("unsafe")
elif a > b:
    print("safe")
Problem p02897 (python)

Fixed submission:
import math
N = int(input())
a = math.ceil(N/2)/N
print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = math.ceil(N/2)/N
print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = ceil(N/2)/N
print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = roundup(N/2)/N

print(a)

Buggy submission (verdict: Runtime Error):
N = int(imput())
a = round(N/2)/N
print(a)

Buggy submission (verdict: Runtime Error):
N = imput()
a = round(N/2)/N
print(a)

Buggy submission (verdict: Runtime Error):
a = round(N/2)/N
print(a)
Problem p02785 (python)

Fixed submission:
n, k = tuple(map(int, input().split(' ')))
hs = list(map(int, input().split(' ')))
if k>=n:
    print(0)
    exit()
hs = sorted(hs)
print(sum(hs[:n-k]))

Buggy submission (verdict: Runtime Error):
n, k = tuple(map(int, input().split(' ')))
hs = list(map(int, input().split(' ')))
if k>=n:
    print(0)
    return
hs = sorted(hs)
print(sum(hs[:n-k]))
Problem p02820 (python)

Fixed submission:
n, k = tuple(map(int, input().split(' ')))
r, s, p = tuple(map(int, input().split(' ')))
t = (input())
def char2int(c):
    if c == 'r':
        return p
    elif c == 's':
        return r
    else:
        return s
st = {i:t[i] for i in range(k)}
ans1 = sum(map(char2int, t[:k]))
ans2 = 0
for i in range(k, n):
    h = t[i]
    m = i%k
    if st[m] != h:
        ans2 += char2int(h)
        st[m] = h
    else:
        st[m] = 'any' 
print(ans1 + ans2)

Buggy submission (verdict: Runtime Error):
n, k = tuple(map(int, input().split(' ')))
r, s, p = tuple(map(int, input().split(' ')))
t = (input())
point = {'r':p, 's':r, 'p':s, 'any':0}
st = {i:t[i] for i in range(k)}
ans1 = sum(map(lambda x: point[x], t[:k]))
ans2 = 0
for i in range(k, n):
    h = t[i]
    m = i%k
    if st[m] != h:
        ans2 += point[h]
        st[m] = h
    else:
        st[m] = 'any' 
print(ans1 + ans2)
return
Problem p03250 (python)

Fixed submission:
ipt=list(map(int,input().split()))
imax=max(ipt)
ipt.remove(imax)
print(10*imax+sum(ipt))

Buggy submission (verdict: Runtime Error):
iptA=list(map(int,input().split()))
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
X.append(iptA[2])
Y.append(iptA[3])
     
xmax,ymin=max(X),min(Y)
if xmax>=ymax:
    print('War')
else:
    print('No War')

Buggy submission (verdict: Runtime Error):
iptA=list(map(int,input().split()))
X=list(map(int,input().split())).append(iptA[2])
Y=list(map(int,input().split())).append(iptA[3])

xmax,ymax=max(X),max(Y)
if xmax>=ymax:
    print('War')
 else:
     print('No War')
Problem p02688 (python)

Fixed submission:
whatMan = []

N, K = input().split()
for i in range(int(K)):
    input()
    whatMan.extend(input().split())
print(int(N) - len(set(whatMan)))

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input().split()
for i in range(int(K)):
    whatMan.extend(input().split())
print(int(N) - set(whatMan).count)

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input().split()
for i in range(int(K)):
    whatMan.extend(input().split())
print(int(N) - set(wahtMan).count)

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input().split()
wahtMan.extend(input().split())
print(wahtMan)

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input().split()
for i in range(int(K)):
    wahtMan.extend(input().split())
print(wahtMan)

Buggy submission (verdict: Runtime Error):
whatMan = []
 
N, K = input().split()
for i in range(int(K)):
    wahtMan.append(input().split())
print(wahtMan)

Buggy submission (verdict: Runtime Error):
whatMan = []
 
N, K = input()
for i in range(int(K)):
    wahtMan.append(input().split())
print(wahtMan)

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input().split()
for i in range(int(K)):
    wahtMan.append(input().split())
print(wahtMan)

Buggy submission (verdict: Runtime Error):
whatMan = []
 
N, K = input()
for i in range(int(K)):
　　　　wahtMan.append(input().split())
print(wahtMan)

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input()
for i in range(int(K)):
    wahtMan.append(input().split())

print(int(N) - set(wahtMan).count)

Buggy submission (verdict: Runtime Error):
whatMan = []

N, K = input()
for i in range(1, K):
    wahtMan.append(input().split())
print(N - set(wahtMan).count)
Problem p02693 (python)

Fixed submission:
K = int(input())
A,B = map(int,input().split())
cnt = 0
for i in range(A, B+1):
    if(i % K == 0):
        print("OK")
        cnt += 1
        break
if(cnt == 0):
    print("NG")

Buggy submission (verdict: Runtime Error):
K =input()
A,B = map(int,input().split())	
 
cnt = 0
for i in range(A, B+1):
    if(i % K == 0):
        print("OK")
        cnt += 1
        break
if(cnt == 0):
    print("NG")

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

cnt = 0
for i in range(A, B+1):
    if(i % K == 0):
        print("OK")
        cnt += 1
        break
if(cnt == 0):
    print("NG")
Problem p02695 (python)

Fixed submission:
import itertools
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]

A_full = [i for i in range(1,M+1)]

l_tensu = 0
for subset in itertools.combinations_with_replacement(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    if(tensu > l_tensu):
        l_tensu = tensu
    
print(l_tensu)

Buggy submission (verdict: Runtime Error):
import itertools
import numpy as np
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]

A_full = np.arange(1,M+1)

l_tensu = [0]
for subset in itertools.combinations_with_replacement(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    l_tensu.append(tensu)
    
print(max(l_tensu))

Buggy submission (verdict: Runtime Error):
import itertools
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]

A_full = np.arange(1,M+1)

l_tensu = [0]
for subset in itertools.combinations(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    l_tensu.append(tensu)
    
print(max(l_tensu))

Buggy submission (verdict: Runtime Error):
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]
A_full = np.arange(1,M+1)

l_tensu = [0]
for subset in itertools.combinations(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    l_tensu.append(tensu)
   
  
print(max(l_tensu))

Buggy submission (verdict: Runtime Error):
import itertools
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]
l_tensu = [0]
for subset in itertools.combinations(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    l_tensu.append(tensu)
print(max(l_tensu))
Problem p02989 (python)

Fixed submission:
import numpy as np
def resolve():
    N = int(input())
    d = [int(i) for i in input().split()]
    d = np.array(d)
    d = np.sort(d)
    print(d[N // 2] - d[N // 2 - 1])
resolve()

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


def resolve():
    N = int(input())
    d = [int(i) for i in input().split()]
    d = np.array(d)
    count = 0
    for i in range(100000):
        if (np.where(d >= i)[0].size == np.where(d < i)[0].size):
            count += 1
    print(count)
    
resolve()
Problem p02693 (python)

Fixed submission:
import sys
K = int(input())
A,B = map(int,input().split())
for i in range(A,B+1):
  if i%K==0:
    print("OK")
    sys.exit(0)
print("NG")

Buggy submission (verdict: Runtime Error):
mport sys
K = int(input())
A,B = map(int,input().split())
for i in range(A,B+1):
  if i%K==0:
    print("OK")
    sys.exit()
print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A,B = map(int,input()split())
for i in range(A,B+1):
  if i%K==0:
    print("OK")
    exit()
print("No")
Problem p02723 (python)

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

Buggy submission (verdict: Runtime Error):
S = input().split()
if S[2]==S[3] and S[4]==[5]:
  print("Yes")
else:
  print("No")
Problem p02693 (python)

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

a = (B//K)*K - A

if a < 0:
    print("NG")

else:
    print("OK")

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

a = (B//K) - (A//K)

if A==B:
    if A % K = 0:
        print("OK")

    else:
        print("NG")

else:
    if a==0:
        print("NG")
    
    else:
        print("OK")

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

a = (B//K) - (A//K)

if A==B:
    if A % K = 0:
        print("OK")

    else:
        print("NG")

if a==0:
    print("NG")

else:
    print("OK")
Problem p02711 (python)

Fixed submission:
N=int(input())
for i in range(3):
    if (N%10)==7:
        break
    N=N//10
if N!=0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N=int(imput())
for i in range(3):
    if (N%10)==7:
        break
    N=N//10
if N!=0:
    print("yes")
else:
    print("No")
Problem p02689 (python)

Fixed submission:
n, m = list(map(int, input().split()))
hs =  list(map(int, input().split()))
ans = [1]*n
roads = []
for i in range(m):
    roads += [list(map(int, input().split()))]
for road in roads:
    if hs[road[0]-1] <= hs[road[1]-1]:
        ans[road[0]-1] = 0
    if hs[road[0]-1] >= hs[road[1]-1]:
        ans[road[1]-1] = 0
print(ans.count(1))

Buggy submission (verdict: Runtime Error):
vn, m = list(map(int, input().split()))
hs =  list(map(int, input().split()))
ans = [1]*n
for i in range(m):
    road = list(map(int, input().split()))
    if hs[road[0]-1] <= hs[road[1]-1]:
        ans[road[0]-1] = 0
    if hs[road[0]-1] >= hs[road[1]-1]:
        ans[road[1]-1] = 0
print(ans.count(0))

Buggy submission (verdict: Runtime Error):
vn, m = list(map(int, input().split()))
hs =  list(map(int, input().split()))
ans = [1]*n
for i in range(m):
    road = list(map(int, input().split()))
    if hs[road[0]-1] <= hs[road[1]-1]:
        ans[road[0]-1] = 0
    if hs[road[0]-1] >= hs[road[1]-1]:
        ans[road[1]-1] = 0
print(ans.count(0))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May  3 13:26:56 2020

@author: r
"""

import sys

n = int(input())
t = [0]
x = [0]
y = [0]
b = 1

for i in range(n):
    a = list(map(int, input().split()))
    t += [a[0]]
    x += [a[1]]
    y += [a[2]]

for i in range(n):
    if (x[i]-x[i+1]+y[i]-y[i+1]-t[i]+t[i+1])%2 or (abs(x[i]-x[i+1])+abs(y[i]-y[i+1])-abs(t[i]-t[i+1])) > 0:
        b = 0
        break
        
    
if b == 0:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))
hs =  list(map(int, input().split()))
ans = [1]*n
roads = []
for i in range(m):
    roads += list(map(int, input().split()))
for road in roads:
    if hs[road[0]-1] <= hs[road[1]-1]:
        ans[road[0]-1] = 0
    if hs[road[0]-1] >= hs[road[1]-1]:
        ans[road[1]-1] = 0
print(ans.count(1))

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))
hs =  list(map(int, input().split()))
ans = [1]*n
for i in range(m):
    road = list(map(int, input().split()))
    if hs[road[0]-1] <= hs[road[1]-1]:
        ans[road[0]-1] = 0
    if hs[road[0]-1] >= hs[road[1]-1]:
        ans[road[1]-1] = 0
print(ans.count(0))
Problem p02725 (python)

Fixed submission:
k, n = map(int, input().split())
list_a = list(map(int, input().split()))
 
x = 0
longest = 0
for a in list_a:
  if a - x > longest:
    longest = a - x
  x = a
if longest < list_a[0] + (k - list_a[n-1]):
  longest = list_a[0] + (k - list_a[n-1])
print(k-longest)

Buggy submission (verdict: Runtime Error):
k, n = map(int, input().split())
list_a = list(map(int, input().split()))
 
x = 0
longest = 0
for a in list_a:
  if a - x > longest:
    longest = a - x
    x = a - x
if longest < a[0] + (k - a[n-1]):
  longest = a[0] + (k - a[n-1])
print(k-longest)

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

x = 0
longest = 0
for a in list_a:
  if a - x > longest:
    longest = a - x
    x = a - x
if longest < a[0] + (k - a[n-1]):
  longest = a[0] + (k - a[n-1]):
print(k-longest)
Problem p03041 (python)

Fixed submission:
n, k = map(int, input().split())
s = list(input())
 
s[k-1] = s[k-1].lower()
print(''.join(s))

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

s[k-1] = s[k-1].lower()
print('',join(s))
Problem p03127 (python)

Fixed submission:
import fractions
from functools import reduce

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

input()

print(gcd_list(list(map(int, input().split()))))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

input()

print(gcd_list(list(map(int, input().split()))))
Problem p02693 (python)

Fixed submission:
k = int(input())
a,b = map(int,input().split())
han = False
for i in range(a,b+1):
    if i%k == 0:
        han = True
if han == True:
    print("OK")
else:
    print("NG")

Buggy submission (verdict: Runtime Error):
k = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
    if i%k == 0:
        han = True
if han == True:
    print("OK")
else:
    print("NG")

Buggy submission (verdict: Runtime Error):
k = input()
a,b = map(int,input().split())
han = False
for i in range(a,b,1):
    if i%k == 0:
        han = True
if han == True:
    print("OK")
else:
    print("NG")

Buggy submission (verdict: Runtime Error):
k = input()
a,b = map(int,input().split())
for i in range(a,b,1):
    if (i%k) == 0:
        han = True
if han == True:
    print("OK")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
k = input()
a,b = map(int,input().split())
for i in range(a,b,1):
    if i%k == 0:
        han = True
if han == True:
    print("OK")
else:
    print("No")
Problem p02711 (python)

Fixed submission:
n = input()
list(n)
han=False
for i in n:
    if i=="7":
        han=True
if han==True:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = input()
list(n)
han=False
for i in n:
    print(i)
    if i=="7":
        han=True
if han=True:
    print("Yes")
else:
    print("No")
Problem p02777 (python)

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

Buggy submission (verdict: Runtime Error):
S, T = input().split()
A, B= map(int, input().split())
U = input()
if S == U:
    print(A - 1, B)
elif T==U:
    print(A, B - 1)
else:

Buggy submission (verdict: Runtime Error):
S, T = input().split()
A, B= map(int, input().split())
U = input()
if S == U:
    print(A - 1, B)
elif:
    print(A, B - 1)

Buggy submission (verdict: Runtime Error):
S,T=input().split()
A,B map(int, input().split())
U = input()
if S==U:
  A-=1
elif T==U:
  B-=1
print(A,B)

Buggy submission (verdict: Runtime Error):
S,T=input().split()
A,B map(int, input().split())
U = input()
if S==U:
  print(A-1,B)
elif T==U:
  print(A,B-1)

Buggy submission (verdict: Runtime Error):
S,T=input(),split()
A,B map(int, input(),split())
U = input()
if S==U:
  A-=1
elif T==U:
  B-=1
print(A,B)

Buggy submission (verdict: Runtime Error):
S,T=map(chr, input(),split())
A,B map(int, input(),split())
U = chr(input())
if S==U:
  A-=1
elif T==U:
  B-=1
print(A,B)

Buggy submission (verdict: Runtime Error):
S,T=map(chr, input(),split())
A,B map(int, input(),split())
U = chr(input())
if S==U:
  A=A-1
elif T==U:
  B=B-1
print(A,B)

Buggy submission (verdict: Runtime Error):
import str
S,T=map(chr, input(),split())
A,B map(int, input(),split())
U = chr(input())
if S==U:
  A-1
elif T==U:
  B-1
print(A,B)

Buggy submission (verdict: Runtime Error):
import str
S,T=map(chr, input(),split())
A,B map(int, input(),split())
U = chr(input())
if S==U:
  print(A-1 B)
elif T==U:
  print(A B-1)
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())
if a+b == 3:
  print(3)
elif a+b == 4:
  print(2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A+B==3:
  print(3)
elif A+B==4:
  print(2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A+B=3:
  print(3)
elif A+B=4:
  print(2)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A+B==3:
  print(3)
elif A+B==4:
  print(2)
elif A+B==5:
  print(1)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A+B=3:
  print(3)
elif A+B=4:
  print(2)
elif A+B=5:
  print(1)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if (A==1 and B==2) or (A==2 and B==1):
  print(3)
elif (A==2 and B==3) or (A==3 and B==2):
  print(1)
elif (A==3 and B==1) or (A==1 and B==3):
  print(2)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A==1 and B==2:
  print(3)
elif A==2 and B==3:
  print(1)
elif A==3 and B==1:
  print(2)