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

Fixed submission:
from collections import deque
S = deque(input())
Q = int(input())
reverse = 0
for i in range(Q):
  Query = list(input().split())
  if Query[0] == "1":
    reverse = (reverse + 1) % 2
  if Query[0] == "2":
    f = int(Query[1])
    c = Query[2]
    if (f + reverse) % 2 == 1:
      S.appendleft(c)
    else:
      S.append(c)

S = "".join(list(S))
 
if reverse == 0:
  print(S)
else:
  print(S[::-1])

Buggy submission (verdict: Runtime Error):
S = input()
Q = int(input())
reverse = 0
for i in range(Q):
  Query = list(input().split())
  if Query[0] == "1":
    reverse = (reverse + 1) % 2
  if Query[0] == "2":
    f = int(Query[1])
    c = query[2]
    if (f + reverse) % 2 == 1:
      S = c + S
    else:
      S = S + c

if reverse == 0:
  print(S)
else:
  print(S[::-1])
Problem p02775 (python)

Fixed submission:
N = input()
count = 0
prev = 0
for i in range(len(N)):
  if 0 <= int(N[i]) + prev < 5:
    count += int(N[i]) + prev
    prev = 0
  elif 6 <= int(N[i]) + prev <= 9:
    count += 10 - (int(N[i]) + prev)
    prev = 1
  elif int(N[i]) + prev == 10:
    prev = 1
  else:
    if (i < (len(N) - 1) and int(N[i+1]) < 5) or i == len(N) - 1:
      count += 5
      prev = 0
    else:
      count += 5
      prev = 1
count = count + prev
print(count)

Buggy submission (verdict: Runtime Error):
prev = 0
for i in range(len(N)):
  if 0 <= int(N[i]) + prev < 5:
    count += int(N[i]) + prev
    prev = 0
  elif 6 <= int(N[i]) + prev <= 9:
    count += 10 - (int(N[i]) + prev)
    prev = 1
  elif int(N[i]) + prev == 10:
    prev = 1
  else:
    if i < (len(N) - 1) and int(N[i+1]) < 5:
      count += 5
      prev = 0
    else:
      count += 5
      prev = 1
count = count + prev

Buggy submission (verdict: Runtime Error):
N = input()
count = 0
prev = 0
for i in range(len(N)):
  if 0 <= int(N[i]) + prev < 5:
    count += int(N[i]) + prev
    prev = 0
  elif 6 <= int(N[i]) + prev <= 9:
    count += 10 - (int(N[i]) + prev)
    prev = 1
  elif int(N[i]) + prev == 10:
    prev = 1
  else:
    if i < len(N) and int(N[i+1]) < 5:
      count += 5
    else:
      count += 5
      prev = 1
count = count + prev
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
count = 0
prev = 0
for i in range(len(N)):
  if 0 <= int(N[i]) + prev < 6:
    count += int(N[i]) - prev
    prev = 0
  elif: 6 <= int(N[i]) + prev <= 9:
    count += 11 - (int(N[i]) - prev)
    prev = 1
  else:
    prev = 1
print(count)
Problem p02640 (python)

Fixed submission:
x, y = map(int, input().split())
if y % 2 == 1:
    print('No')
else:
    if 2 * x <= y <= 4 * x:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
if y % 2 == 1:
    print('No')
else:
    for i in range(x + 1):
        foot = i * 2 + (x - i) * 4
        if foot == y:
            print('Yes')
            exit()
    print('No')

Buggy submission (verdict: Runtime Error):
if y % 2 == 1:
    print('No')
else:
    for i in range(x + 1):
        foot = i * 2 + (x - i) * 4
        if foot == y:
            print('Yes')
            break

print('No')
Problem p02641 (python)

Fixed submission:
x, n = list(map(int, input().split()))
p_list = list(map(int, input().split()))
if n == 0:
    print(x)
    exit()

i = 0
while True:
    x_i = x - i
    x_j = x + i

    if x_i not in p_list:
        print(x_i)
        exit()
    if x_j not in p_list:
        print(x_j)
        exit()

    i += 1

Buggy submission (verdict: Runtime Error):
x, n = list(map(int, input().split()))
if n == 0:
    print(x)
    exit()
p_list = list(map(int, input().split()))

idx = p_list.index(x)

i = 0
while True:
    x_i = x - i
    x_j = x + i

    if x_i not in p_list:
        print(x_i)
        exit()
    if x_j not in p_list:
        print(x_j)
        exit()

    i += 1
Problem p02684 (python)

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

START = 1
# 訪れたタイミング
town_with_i = {START: 0}
# 現在地
current = START
# 既に訪れたことある街(巡回の判定に使う)
known_towns = set([START])
i = 0
for _ in range(k):
    i += 1
    # 現在地
    current = a_list[current - 1]

    # 既に来たことがあるということは巡回している
    if current in known_towns:
        break

    # メモ
    town_with_i[current] = i
    known_towns.add(current)

# 巡回までのステップ数
first_step = town_with_i[current]
# 1周するのに必要なステップ数
r = i - town_with_i[current]

# print(town_with_i)
# print(current)
# print(i)
# print(r)

loop_num = (k - first_step) % r if r > 0 else (k - first_step)

for i in range(loop_num):
    current = a_list[current - 1]

print(current)

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

START = 1
# 訪れたタイミング
town_with_i = {START: 0}
# 現在地
current = START
# 既に訪れたことある街(巡回の判定に使う)
known_towns = set([START])
i = 0
for _ in range(k):
    i += 1
    # 現在地
    current = a_list[current - 1]

    # 既に来たことがあるということは巡回している
    if current in known_towns:
        break

    # メモ
    town_with_i[current] = i
    known_towns.add(current)

# 巡回までのステップ数
first_step = town_with_i[current]
# 1周するのに必要なステップ数
r = i - town_with_i[current]

# print(town_with_i)
# print(current)
# print(i)
# print(r)

loop_num = (k - first_step) % r

for i in range(loop_num):
    current = a_list[current - 1]

print(current)
Problem p03076 (python)

Fixed submission:
import math

time_list = list()

for _ in range(5):
    time_list.append(int(input()))

# 全探索
ans = 1e6
for i in range(len(time_list)):
    tmp = 0
    for j in range(len(time_list)):
        if i == j:
            tmp += time_list[i]
            continue
        tmp += math.ceil(time_list[j] / 10) * 10
    ans = min(tmp, ans)

print(ans)

Buggy submission (verdict: Runtime Error):
import math

time_list = list()

for _ in range(5):
    time_list.append(int(input()))


def key_func(x):
    if x < 100:  # 2桁 or 1桁の場合
        if x % 10 == 0:
            return 10
        return x % 10  # ex: 19の場合は9を返す
    else:
        if x % 100 == 0:
            return 10
        return x % 100  # ex: 123の場合は3を返す


time_list.sort(key=key_func, reverse=True)

# print(time_list)

ans = sum
for i, time in enumerate(time_list):
    if i < len(time_list) - 1:
        ans += math.ceil(time / 10) * 10
    else:
        ans += time

print(ans)

Buggy submission (verdict: Runtime Error):
import math

time_list = list()

for _ in range(5):
    time_list.append(int(input()))


def key_func(x):
    if x < 100:
        if x % 10 == 0:
            return 10
        return x % 10  # ex: 19の場合は9を返す
    else:
        if x % 100 == 0:
            return 10
        return x % 100  # ex: 123の場合は3を返す


time_list.sort(key=key_func, reverse=True)

print(time_list)

ans = sum
for i, time in enumerate(time_list):
    if i < len(time_list) - 1:
        ans += math.ceil(time / 10) * 10
    else:
        ans += time

print(ans)
Problem p02719 (python)

Fixed submission:
N, K = map(int, input().split())
ans = N
if N < K:
    if N != 0:
        q, mod = divmod(K, N)
        ans = min(N, K - N)
    elif N == 0:
        ans = 0
elif N == K:
    ans = 0
else:
    q, mod = divmod(N, K)
    ans = min(mod, abs(K - mod))
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
ans = N
if N < K:
    q, mod = divmod(K, N)
    ans = min(N, K - N)
elif N == K:
    ans = 0
else:
    q, mod = divmod(N, K)
    ans = min(mod, abs(K - mod))
print(ans)
Problem p02663 (python)

Fixed submission:
a=input()
a0=a.split()
h1=int(a0[0])
m1=int(a0[1])
h2=int(a0[2])
m2=int(a0[3])
k=int(a0[4])
t1=60*h1+m1
t2=60*h2+m2
t=t2-t1
print(t-k)

Buggy submission (verdict: Runtime Error):
import sys
import numpy
n=int(input())
a=input()
a=a.split()
M=1
m=int(a[n])
Ml=list()
ml=list()
Ml.append(M)
ml.append(m)
Q=0
if int(a[0])>=1:
    print(-1)
    sys.exit()
for i in range(n):
    M=2*M-int(a[i+1])
    if M<0:
        print(-1)
        sys.exit()
    M1=M+int(a[i+1])
    Ml.append(M1)
    m=m+int(a[n-i-1])
    ml.insert(0,m)
numpy.array(Ml)
numpy.array(ml)
Q1=numpy.minimum(Ml,ml)
Q1=sum(Q1)
print(Q1)
Problem p02801 (python)

Fixed submission:
alpha = input()

# ald = [1:a,2:b,3:c,4:d,5:e,6:f,8:g,9:h,10:i,11:j,12:k,13:l,14:m,15:n,16:o,16:p,17:q,18:r,19:s,20:t,21:u,22:v,23:w,24:x,25:y,26:z]

ald = {'a':'b','b':'c','c':'d','d':'e','e':'f','f':'g','g':'h','h':'i','i':'j','j':'k','k':'l','l':'m','m':'n','n':'o','o':'p','p':'q','q':'r','r':'s','s':'t','t':'u','u':'v','v':'w',"w":'x','x':'y','y':'z'}


if alpha in ald:
    print(ald[alpha])

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

# ald = [1:a,2:b,3:c,4:d,5:e,6:f,8:g,9:h,10:i,11:j,12:k,13:l,14:m,15:n,16:o,16:p,17:q,18:r,19:s,20:t,21:u,22:v,23:w,24:x,25:y,26:z]

ald = {'a':'b','b':'c','c':'d','d':'e','e':'f','f':'g','g':'h','h':'i','i':'j','j':'k','k':'l','l':'m','m','n','n':'o','o':'p','p':'q','q':'r','r':'s','s':'t','t':'u','u':'v','v':'w','w':'x','x':'y','y':'z'}

if al in ald:
    print(ald[al])

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

# ald = [1:a,2:b,3:c,4:d,5:e,6:f,8:g,9:h,10:i,11:j,12:k,13:l,14:m,15:n,16:o,16:p,17:q,18:r,19:s,20:t,21:u,22:v,23:w,24:x,25:y,26:z]

ald = [a:b,b:c,c:d,d:e,e:f,f:g,g:h,h:i,i:j,j:k,k:l,l:m,m,n,n:o,o:p,p:q,q:r,r:s,s:t,t:u,u:v,v:w,w:x,x:y,y:z]

if al in ald:
    print(ald[al])
Problem p02601 (python)

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

ans=0

while(1):
    if(b<=a):
        b=b*2
        ans+=1
    else:
        break
while(1):
    if(c<=b):
        c=c*2
        ans+=1
    else:
        break    
        
if(ans > k):
    print('No')
else:
    print('Yes')

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

while(1):
    if(b<=a):
        b=b*2
        ans+=1
    else:
        break
while(1):
    if(c<=b):
        c=c*2
        ans+=1
    else:
        break    
        
if(ans > k):
    print('No')
else:
    print('Yes')
Problem p02612 (python)

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

Buggy submission (verdict: Runtime Error):
n = input()
#lol=[int(n) for n in input().split()]
print(1000-(n%1000))
Problem p02613 (python)

Fixed submission:
n = int(input())
lol=[]
for _ in range(n):
    lol.append(input())
print('AC x ',lol.count('AC'))
print('WA x ',lol.count('WA'))
print('TLE x ',lol.count('TLE'))
print('RE x ',lol.count('RE'))

Buggy submission (verdict: Runtime Error):
n = input()
lol=[]
for _ in range(n):
    lol.append(input())
print('AC X ',lol.count('AC'))
print('WA X ',lol.count('WA'))
print('TLE X ',lol.count('TLE'))
print('RE X ',lol.count('RE'))
Problem p02628 (python)

Fixed submission:
a,b = map(int,input().split())
lol = [int(n) for n in input().split()]
lol.sort()
print(sum(lol[:b]))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
lol = [int(n) for n in input().split()]
lol.sort()
print(sum(lol[:k]))
Problem p02639 (python)

Fixed submission:
lol= [int(n) for n in input().split()]
for i in range(5):
    if(lol[i] == 0):
        print(i+1)
        break

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if(b%2!=0):
    print("No")
else:
    z = b//2 
    y = b//4
    if(a>=y and a <=z):
        print('Yes')
    else:
        print('No')
Problem p02755 (python)

Fixed submission:
from math import ceil, floor
 
a, b = [int(c) for c in input().split(" ")]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(A);

Buggy submission (verdict: Runtime Error):
from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(-1);

Buggy submission (verdict: Runtime Error):
from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
	print(-1);

Buggy submission (verdict: Runtime Error):
a,b = [int(c) for c in input()]

A = ceil(a / 0.08)
B = ceil(b/ 0.1)

if (A > B):
  if (floor(B * 0.08) == a):
    print(B);
elif (B > A):
  if (floor(A*0.1) == b):
    print(A);
print(-1);
Problem p02675 (python)

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

Buggy submission (verdict: Runtime Error):
s=input()
if s[-1]==3:
  print('bon')
elif s[-1] in [0,1,6,8]
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
s=list(input())
if s[-1]=='3':
  print('bon')
elif s[-1] in [0,1,6,8]
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
s=int(input())
if s[-1]==2 and s[-1]==4 and s[-1]==5 and s[-1]==7 and s[-1]==9:
    print('hon')
elif s[-1]==0 and s[-1]==1 and s[-1]==6 and s[-1]==8:
    print('pon')
else:
    print('bon')

Buggy submission (verdict: Runtime Error):
s=int(input())
if s[-1]==2 and s[-1]==4 and s[-1]==5 and s[-1]==7 and s[-1]==9:
    print('hon')
elif s[-1]==0 and s[-1]==1 and s[-1]==6 and s[-1]==8
    print('pon')
else:
    print('bon')

Buggy submission (verdict: Runtime Error):
n=int(input())
if s[-1]==2 and s[-1]==4 and s[-1]==5 and s[-1]==7 and s[-1]==9:
    print('hon')
elif s[-1]==0 and s[-1]==1 and s[-1]==6 and s[-1]==8
    print('pon')
else:
    print('bon')

Buggy submission (verdict: Runtime Error):
n=int(input())
if s[-1]=2 and s[-1]=4 and s[-1]=5 and s[-1]=7 and s[-1]=9:
    print('hon')
elif s[-1]=0 and s[-1]=1 and s[-1]=6 and s[-1]=8
    print('pon')
else:
    print('bon')
Problem p02705 (python)

Fixed submission:
s=int(input())
print(2*s*3.14)

Buggy submission (verdict: Runtime Error):
s=int(input())
print(int(s*3.14)
Problem p02718 (python)

Fixed submission:
x,y = map(int,input().split())
A=list(map(int,input().split()))
T=sum(A)
a=0
for i in range(x):
  if A[i]>=T/(4*y):
    a+=1
if a>=y:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
x,y = map(int,input().split())
A=[int(input())  for i in range(x)]
T=sum(A)
a=0
for i in range(x):
  if A[i]<1/(4*T):
    a+=1
if a>=y:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
s=int(input())
S=sum(s)
if sorted(s)[-1:-M]<S/(4*M):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
N,M,s=map(int,input().split())
S=sum(s)
if sorted(s)[-1:-M]<S/(4*M):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
N,M,s=map(int,input().split())
S=sum(s)
if sorted(s)[-1:-m]<S/(4*M):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):

N,M,s=map(int,input().split())
S=sum(s)
m=sorted(s)[-M]
if m<S/(4*M):
    print('No')
else:
    print('Yes')
Problem p02747 (python)

Fixed submission:
a=input()
if a=='hi' or a=='hihi' or a=='hihihi' or  a=='hihihihi' or a=='hihihihihi' :    
    print('Yes')
else :
    print('No')

Buggy submission (verdict: Runtime Error):
a=input()
if a=='hi' or
   a=='hihi' or
   a=='hihihi' or
    a=='hihihihi' or
    a=='hihihihihi' :    
    print('Yes')
else:
    print('No')
Problem p02765 (python)

Fixed submission:
a,b=map(int,input().split())
if a>9:
  print(b)
else:
  print(b+(100*(10-a)))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>9:
  print(b)
else:
  print(b+(100＊(10-a)))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>9:
  print(b)
else:
  print(b+(100＊(10-a))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>9:
  print(b)
else:
  print(b+(100＊(10-b))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>10:
  print(b)
else:
  print(b+(100＊(10-b))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>10:
  print(b)
else:
  print(b-(100＊(10-b))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>10:
    print('b')
else:
    print(b-(100＊(10-b))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>10:
    print('b')
else:
    print(b-(100＊(10-b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>9:
    print('b')
else
    print(b-(100＊(10-b)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a>9:
    print('b')
else
    print(b-(100＊(10-b))

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a>10:
    print('b')
else
    print(b-(100＊(10-b))

Buggy submission (verdict: Runtime Error):
a,b=int(input())
if a>10:
    print('b')
else
    print(b-(100＊(10-b))
Problem p02789 (python)

Fixed submission:
x, y = input().split(' ')
if x == y:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
if N=M:
    print('Yes')
else :
    print('No')
Problem p02817 (python)

Fixed submission:
S,T=map(str,input().split())
print('{}{}'.format(T,S))

Buggy submission (verdict: Runtime Error):
S,T=map(input().split())
print('{}{}'.format(T,S))

Buggy submission (verdict: Runtime Error):
S,T=map(input().split())
print('{T}{S}'.format(S,T))

Buggy submission (verdict: Runtime Error):
S,T=map(input().split())
print('S'end'')
print('T')

Buggy submission (verdict: Runtime Error):
S,T=input().split()
print('S'end'')
print('T')
Problem p02885 (python)

Fixed submission:
a,b=map(int,input().split())
if a-2*b>0:
    print(a-2*b)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a-2*b>0:
  　　print(a-2*b)
else:
　　　　print(0)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a-2*b>0:
  print(a-2*b)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a-2*b>0:
  print(a-2*b)
else:
  print(0)
Problem p02886 (python)

Fixed submission:
n=int(input())
li = list(map(int,input().split()))
a=0
for i in range(n):
  for j in range(n):
    a += li[i]*li[j]
b=0
for i in range(n):
    b+= li[i]*li[i]
print((a-b)//2)

Buggy submission (verdict: Runtime Error):
n=int(input())
li = list(map(int,input().split()))
a=0
for i in range(n-1):
  for j in range(n):
    a += li[i]*li[j+1]
print(a)
Problem p02909 (python)

Fixed submission:
s=input()
if s=='Sunny':
    print('Cloudy')
elif s=='Cloudy':
    print('Rainy')
else:
    print('Sunny')

Buggy submission (verdict: Runtime Error):
s=input()
if s=='Sunny':
    print('Cloudy')
elif s=='Cloudy':
    print('Rainy')
else:
    pront('Sunny')
Problem p02921 (python)

Fixed submission:
S=input()
T=input()
ans=0
for i in range(3):
 if S[i]==T[i]:
     ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
ans=0
for i in range(3):
    if S[i]==T[i]:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
ans=0
for i in range(3):
if S[i]==T[i]:
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
ans=0
for i in range(3):
if s[i]==s[i]:
ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
ans=0
for i in range(3):
if s[i]=s[i]:
ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
if a==b:
    print(3)
elif a[0]=b[0] and a[1]=b[1] and a[2]!=b[2]:
    print(2)
elif a[0]=b[0] and a[1]!=b[1] and a[2]=b[2]:
    print(2)
elif a[0]!=b[0] and a[1]=b[1] and a[2]=b[2]:
    print(2)
elif a[0]!=b[0] and a[1]!=b[1] and a[2]!=b[2]:
    print(0)
else :
    print(1)

Buggy submission (verdict: Runtime Error):
a,b=minput().split()
if a==b:
    print(3)
elif a!=b:
    print(0)
elif a[0]=b[0] and a[1]=b[1] and a[2]!=b[2]:
    print(2)
elif a[0]=b[0] and a[1]!=b[1] and a[2]=b[2]:
    print(2)
elif a[0]!=b[0] and a[1]=b[1] and a[2]=b[2]:
    print(2)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
a,b=map(input().split())
if a==b:
    print(3)
elif a!=b:
    print(0)
elif a[0]=b[0] and a[1]=b[1] and a[2]!=b[2]:
    print(2)
elif a[0]=b[0] and a[1]!=b[1] and a[2]=b[2]:
    print(2)
elif a[0]!=b[0] and a[1]=b[1] and a[2]=b[2]:
    print(2)
else:
    print(1)
Problem p02993 (python)

Fixed submission:
s=input()
if s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]:
    print('Good')
else:
    print('Bad')

Buggy submission (verdict: Runtime Error):
s=int(input())
if s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]:
    print('Good')
else:
    print('Bad')

Buggy submission (verdict: Runtime Error):
s=input()
n=0
while s[n]!=s[n+1]:
    n+=1
    print('Good')
else:
    print('Bad')

Buggy submission (verdict: Runtime Error):
s=int(input())
n=0
while s[n]!=s[n+1]:
    n+=1
    n=5:
        print('Good') 
else:
    print('Bad')
Problem p03029 (python)

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

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

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

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

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

Buggy submission (verdict: Runtime Error):
 a,b=map(int,input())
print((3a+b)//2)
Problem p03035 (python)

Fixed submission:
a,b=map(int,input().split())
if a>12:
    print(int(b))	
elif 12>=a>=6:
    print(int(b/2))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>12:
    print(int(b))	
elif 12>=a>=6:
    print(int(b/2)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().spplit())
if a>12:
    print(int(b))	
elif 12>=a>=6:
    print(int(b/2)
else:
    print(0)
Problem p03071 (python)

Fixed submission:
a,b=map(int,input().split())
print(max(a+b,max(a,b)+max(a-1,b-1)))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
print(max(a+b,mac(a,b)+max(a-1,b-1)))

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,inpput().split())
print(max(a+b,max(a,b)+max(a-1,b-1)))

Buggy submission (verdict: Runtime Error):
a,b=map(int,inpput().split())
print(max(a+b,max(a,b)+max(a-1,b-1))
Problem p03085 (python)

Fixed submission:
n=input()
if n=='A':
    print('T')
elif n=='T':
    print('A')
elif n=='C':
    print('G')
else:
    print('C')

Buggy submission (verdict: Runtime Error):
n=input()
if n==A:
  print('T')
elif n==T:
  print('A')
elif n==C:
  print('G')
else:
  print('C')

Buggy submission (verdict: Runtime Error):
n=input()
if n==A:
  print('T')
elif n==T:
  print('A')
elif n=C:
  print('G')
else:
  print('C')
Problem p03101 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
c,d=map(int,input().split())
print(int(((a-c)*(b-d)))
Problem p03109 (python)

Fixed submission:
S=input()
if int(S[5:7])<5:
    print('Heisei')
else:
    print('TBD')

Buggy submission (verdict: Runtime Error):
S=input()
if S[5:7]<5:
    print('Heisei')
else:
    print('TBD')
Problem p03260 (python)

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

Buggy submission (verdict: Runtime Error):
a,s=map(int,input().split())
if a!=2 and s!=2!:
    print('YES')
    
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
a,s=map(int,input().split())
if a!=2 and s!=2!
    print('YES')
    
else:
    print('NO')
Problem p03473 (python)

Fixed submission:
a=int(input())
print(24+(24-a))

Buggy submission (verdict: Runtime Error):
a=int(input())
print(24+(24-a)
Problem p03485 (python)

Fixed submission:
import math
a,b=map(int,input().split())
print(math.ceil((a+b)/2))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input()split())
print((a+b)//2)