Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())

ans = 0

for i in range(0,K+1):
    for j in range (0,K+1):
        for k in range (0,K+1):
            if (i + j + k) == S:
                ans = ans + 1
                continue
            

print(ans)


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

ans = 0

for i in range(0,K+1):
    for j in range (0,K+1):
        if (S-K) <= (i + j) <= S:
            ans = ans + 1
            continue
            

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())

ans = 0

for i in range(0,K+1):
    for j in range (0,K+1):
        for k in range (0,K+1):
            if (i + j + k) == S:
                ans = ans + 1
            

print(ans)


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

ans = 0

for i in range(0,K+1):
    for j in range (0,K+1):
        if (S-K) <= (i + j) <= S:
            ans = ans + 1
            continue
            

print(ans)

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

ans = 0

for i in range(0,K+1):
    for j in range (0,K+1):
        for k in range (0,K+1):
            if (i + j + k) == S:
                ans = ans + 1
            

print(ans)


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

ans = 0

for i in range(0,K+1):
    for j in range (0,K+1):
        if (S-K) <= (i + j) <= S:
            ans = ans + 1
            continue
            

print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
##print(S)
tmp=0
T=0
for i in range(N):
  T=T+[i+1]
  ##print(T)
  ##print(A[i])
  tmp=(A[i]*(S-T)+tmp)
tmp=tmp%(10**9+7)
print(tmp)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
##print(S)
tmp=0
T=0
for i in range(N-1):
  T=T+A[i]
  ##print(T)
  ##print(A[i])
  tmp=(A[i]*(S-T)+tmp)
tmp=tmp%(10**9+7)
print(tmp)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
##print(S)
tmp=0
for i in range(N):
  T=sum(A[0:i+1])
  ##print(T)
  ##print(A[i])
  tmp=(A[i]*(S-T)+tmp)
tmp=tmp%(10**9+7)
print(tmp)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
##print(S)
tmp=0
T=0
for i in range(N-1):
  T=T+A[i]
  ##print(T)
  ##print(A[i])
  tmp=(A[i]*(S-T)+tmp)
tmp=tmp%(10**9+7)
print(tmp)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
tmp=0
for i in range(N):
  L=A[i+1:N]
  ##print(L)
  ##print(sum(L))
  ##print(A[i])
  tmp=(A[i]*sum(L)+tmp)%(10**9+7)
print(tmp)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
##print(S)
tmp=0
T=0
for i in range(N-1):
  T=T+A[i]
  ##print(T)
  ##print(A[i])
  tmp=(A[i]*(S-T)+tmp)
tmp=tmp%(10**9+7)
print(tmp)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
tmp=0
for i in range(N):
  L=A[i+1:N]
  ##print(L)
  ##print(sum(L))
  ##print(A[i])
  tmp=A[i]*sum(L)+tmp
tmp=tmp%(10**9+7)
print(tmp)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
S=sum(A)
##print(S)
tmp=0
T=0
for i in range(N-1):
  T=T+A[i]
  ##print(T)
  ##print(A[i])
  tmp=(A[i]*(S-T)+tmp)
tmp=tmp%(10**9+7)
print(tmp)
Buggy python submission (verdict: Runtime Error):
X,K,D=map(int,input().split())
count=0

result=X
target=int(X/D)
if (D-target)%2=0:
  if abs(result-D*target)>abs(result+D*target):
    result=result+D*target
  else:
    result=result-D*target
else:
  if abs(result-(D+1)target)>abs(result+(D+1)*target):
    result=result+(D+1)*target
  else:
    result=result-(D+1)*target
  
print(str(abs(result)))    

Fixed submission:
import math
X,K,D=map(int,input().split())
count=0
#Xが初期値
#Dが移動量（+or-）
#K回移動後の最小の座標
#X/D＞Kの場合、K*D＋Xが答え

Y = 0
#X>0 D>0 の場合
if X / D > K and X / D > 0:
    Y = abs(X - D * K)
elif abs(X / D) > K and X / D < 0:
    Y = abs(X + D * K)
else:
    #X/D<Kの場合、X mod D
    L = abs(X) % D
    M = math.floor(abs(X) / D)
    if (K - M) % 2 == 0:
        Y = L
    else:
        Y=abs(L-D)

print(Y)
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
#a1= 7 mod K
#a2= a1*10+7 mod K
#a3= a2*10+7 mod K
a = 0
count = -1
for i in range(K):
    a = (7 + a*10)
    if a % K== 0:
        count=i+1
        break
print(count)

Fixed submission:
K = int(input())
#a1= 7 mod K
#a2= a1*10+7 mod K
#a3= a2*10+7 mod K
a = 0
count = -1
for i in range(K):
    a = (7 + a*10) % K
    if a  == 0:
        count=i+1
        break
print(count)
Buggy python submission (verdict: Runtime Error):
n,m,k=map(int,input().split())
data2=list(map(int,input().split()))
data3=list(map(int,input().split()))

data2cnt=0
data3cnt=0
total=0
count=0
maxint=n+m

for i in range(maxint):
  if len(data2)>=data2cnt+1 and int(data2[data2cnt]) < int(data3[data3cnt]):
      if k>=total+data2[data2cnt]:
        total=total+int(data2[data2cnt])
        data2cnt=data2cnt+1
  elif len(data3)>=data3cnt+1:
      if k>=total+data3[data3cnt]:
        total=total+int(data3[data3cnt])
        data3cnt=data3cnt+1
  else:
    break

print(str(data2cnt+data3cnt))

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(len(A)):
    a.append(a[i]+A[i])
for i in range(len(B)):
    b.append(b[i]+B[i])
#すべてJの場合から減らしていく
ans,j=0,M
for i in range(N+1):
    if a[i] > K:
        break
    #すべてBの総和がK-a[i]より小さくなるjを測定
    while b[j] > K - a[i]:
        j -= 1
    #i+jとansのうち大きい方を答えにする。
    ans= max(ans,i+j)

print(ans)

Buggy python submission (verdict: Runtime Error):
n,m,k=map(int,input().split())
data2=list(map(int,input().split()))
data3=list(map(int,input().split()))

data2cnt=0
data3cnt=0
total=0
count=0
maxint=n+m

for i in range(maxint):
  if len(data2)>=data2cnt+1 and int(data2[data2cnt]) < int(data3[data3cnt]):
      if k>=total+data2[data2cnt]:
        total=total+int(data2[data2cnt])
        data2cnt=data2cnt+1
  elif len(data3)>=data3cnt+1:
      if k>=total+data3[data3cnt]:
        total=total+int(data3[data3cnt])
        data3cnt=data3cnt+1
print(str(data2cnt+data3cnt))


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(len(A)):
    a.append(a[i]+A[i])
for i in range(len(B)):
    b.append(b[i]+B[i])
#すべてJの場合から減らしていく
ans,j=0,M
for i in range(N+1):
    if a[i] > K:
        break
    #すべてBの総和がK-a[i]より小さくなるjを測定
    while b[j] > K - a[i]:
        j -= 1
    #i+jとansのうち大きい方を答えにする。
    ans= max(ans,i+j)

print(ans)

Buggy python submission (verdict: Runtime Error):
n,m,k=map(int,input().split())
data2=list(map(int,input().split()))
data3=list(map(int,input().split()))

data2cnt=0
data3cnt=0
total=0
count=0
maxint=n+m

for i in range(maxint):

  if len(data2)>=data2cnt+1 and int(data2[data2cnt]) < int(data3[data3cnt]):
      if k>=total+data2[data2cnt]:
        total=total+int(data2[data2cnt])
        data2cnt=data2cnt+1
  elif len(data3)>=data3cnt+1:
      if k>=total+data3[data3cnt]:
        total=total+int(data3[data3cnt])
        data3cnt=data3cnt+1
print(str(data2cnt+data3cnt))


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(len(A)):
    a.append(a[i]+A[i])
for i in range(len(B)):
    b.append(b[i]+B[i])
#すべてJの場合から減らしていく
ans,j=0,M
for i in range(N+1):
    if a[i] > K:
        break
    #すべてBの総和がK-a[i]より小さくなるjを測定
    while b[j] > K - a[i]:
        j -= 1
    #i+jとansのうち大きい方を答えにする。
    ans= max(ans,i+j)

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

for i in range(len(x)):
    if x[i] == 0:

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

for i in range(len(x)):
    if x[i] == 0:
        print(i+1)
Buggy python submission (verdict: Runtime Error):
a = int(input()
if a = 1:
    print(0)
else:
    print(1)

Fixed submission:
a = int(input())
if a == 1:
    print(0)
else:
    print(1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
saidan = input()

isiall = min(saidan.count('W'), saidan.count('R'))

tesuu = 0
for i in range(len(saidan)//2):
    r_iti = saidan.rfind('R')
    w_iti = saidan.find('W')
    
    if r_iti == -1 or w_iti == -1:
        break
    
    saidan = saidan[w_iti+1 : r_iti]
    tesuu += 1
    
    print(tesuu, saidan)
    
print(min(tesuu, isiall))

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

isiall = min(saidan.count('W'), saidan.count('R'))

tesuu = 0
for i in range(len(saidan)//2):
    r_iti = saidan.rfind('R')
    w_iti = saidan.find('W')
    
    if r_iti == -1 or w_iti == -1 or r_iti < w_iti:
        break
    
    saidan = saidan[w_iti+1 : r_iti]
    tesuu += 1
    
print(min(tesuu, isiall))
Buggy python submission (verdict: Time Limit Exceeded):
_ = input()
nums = list(map(int, input().split()))
ans = 1

for num in nums:
    ans *= num

print(ans if ans <= 10**18 else -1)

Fixed submission:
_ = input()
nums = list(map(int, input().split()))
ans = 1

if 0 in nums:
  ans = 0
 
for num in nums:
    if ans <= 10 ** 18:
        ans *= num
    else:
        break
 
print(ans if ans <= 10**18 else -1)
Buggy python submission (verdict: Runtime Error):
k, n = map(int, input().split())
home_positions = list(map(int, input().split()))


def max_distance_homes(homes):
    max_distance = 0
    for i in range(len(homes) - 1):
        distance = homes[i + 1] - homes[i]
        if max_distance < distance:
            max_distance = distance
    distance = k + homes[0] - homes[-1]
    if max_distance < distance:
        max_distance = distance
    return max_distance


print(k - max_distance_homes(home_positions))

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

Buggy python submission (verdict: Runtime Error):
inp = input()
print('Yes' if inp[3] == inp[4] and inp[5] == inp[6] else 'No')

Fixed submission:
inp = input()
print('Yes' if inp[2] == inp[3] and inp[4] == inp[5] else 'No')
Buggy python submission (verdict: Runtime Error):
import collections
from scipy import special

n = int(input())
num_list = list(map(int, input().split()))

for i in range(0, n):
    target_list = num_list[0:i] + num_list[i+1:]
    target_items = collections.Counter(target_list).items()
    ans = 0

    for item in target_items:
        if item[1] > 1:
            ans += special.comb(item[1], 2, True)

    print(ans)


Fixed submission:
import collections

n = int(input())
num_list = list(map(int, input().split()))

cnt = collections.Counter(num_list)
ttl = 0
for v in cnt.values():
    ttl += v*(v-1)//2
for a in num_list:
    print(ttl - (cnt[a] - 1))

Buggy python submission (verdict: Runtime Error):
import collections
from scipy import special

n = int(input())
num_list = list(map(int, input().split()))

for i in range(0, n):
    target_list = num_list[0:i] + num_list[i+1:]
    target_items = collections.Counter(target_list).items()
    ans = 0

    for item in target_items:
        if item[1] > 1:
            ans += special.comb(item[1], 2, True)

    print(ans)

Fixed submission:
import collections

n = int(input())
num_list = list(map(int, input().split()))

cnt = collections.Counter(num_list)
ttl = 0
for v in cnt.values():
    ttl += v*(v-1)//2
for a in num_list:
    print(ttl - (cnt[a] - 1))
Buggy python submission (verdict: Runtime Error):
a, b, m = map(int, input().split())
a_s = list(map(int, input().split()))
b_s = list(map(int, input().split()))
m_s =[]

for _ in range(m):
    m_s.append(list(map(int, input().split())))

mini = min(a_s) + min(b_s)

for am, bm, sale in m_s:
    mini = min(mini, a_s[am]+b_s[bm]-sale)

print(mini)

Fixed submission:
a, b, m = map(int, input().split())
a_s = list(map(int, input().split()))
b_s = list(map(int, input().split()))
m_s =[]

for _ in range(m):
    m_s.append(list(map(int, input().split())))

mini = min(a_s) + min(b_s)

for am, bm, sale in m_s:
    mini = min(mini, a_s[am-1]+b_s[bm-1]-sale)

print(mini)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
rules = []

for x in range(m):
  rules.append(list(map(int, input().split())

def get_ans():
  if m == 0:
      return(10**(n-1)*int(bool(1<n)))

  for i in range(10**(n-1)*int(bool(1<n)), 10**n):
      for j, rule in enumerate(rules):

          if int(str(i)[rule[0]-1]) == rule[1]:
              if j == len(rules)-1:
                  return(i)
              else:
                  continue
          else:
              break
      return(-1)


print(get_ans())                    


Fixed submission:
n, m = map(int, input().split())
rules = [list(map(int, input().split())) for _ in range(m)]

def get_ans():
    if m == 0:
        return(10**(n-1)*int(bool(1<n)))
        
    for i in range(10**(n-1)*int(bool(1<n)), 10**n):
        for j, rule in enumerate(rules):
            
            if int(str(i)[rule[0]-1]) == rule[1]:
                if j == len(rules)-1:
                    return(i)
                else:
                    continue
            else:
                break
                
    return(-1)


print(get_ans())
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
nums = list(input().split(' '))
if [x for x in set(nums) if nums.count(x) > 1]:
    print("NO")
else:
    print("YES")

Fixed submission:
n = input()
nums = list(input().split(' '))
if len(nums) != len(set(nums)):
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Runtime Error):
n = int(input())
playlists = []

for _ in range(n):
    title, playtime = input().split()
    playlists.append([title, int(playtime)])

lastmusic = input()

print(sum([x[1] for x in playlists[playlists[0].index(lastmusic) + 1:]]))

Fixed submission:
music_num = int(input())
music_list = []

for i in range(music_num):
    music_list.append(input().split(' '))

sleep_timing_music = input()
flag = False
sleep_time = 0

for j in music_list:
    if flag == True:
        sleep_time += int(j[1])
        
    if j[0] == sleep_timing_music:
        flag = True

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

input_nums = list(map(int, input().split()))
num1 = input_nums[0]
num2 = input_nums[1]

print(num1 * num2 // math.gcd(num1, num2))

Fixed submission:
input_nums = list(map(int, input().split()))
num1 = input_nums[0]
num2 = input_nums[1]

def gcd(num1, num2):
    a = max(num1, num2)
    b = min(num1, num2)
    r = a%b
    while(r != 0):
        a = b
        b = r
        r = a%b
    return b
    

print(num1 * num2 // gcd(num1, num2))
Buggy python submission (verdict: Runtime Error):
def kyori(a,b,c,d):
    x = (int(a) - int(b)) ** 0.5
    y = (int(c) - int(d)) ** 0.5
    z = x + y
    return z

n = int(input())
city_list = [0]*n
total_kyori = 0.0

for i in range(n):
  city_list[i] = input().split()

for j in range(n):
  for k in range(n):
    total_kyori += kyori(j[0], k[0], j[1], k[1])

print(total_kyori/n*(n-1))

Fixed submission:
def kyori(a, b, c, d):
    x = (int(a) - int(b)) ** 2
    y = (int(c) - int(d)) ** 2
    z = (x + y) ** 0.5
    return z

n = int(input())
city_list = [0]*n
total_kyori = 0.0

for i in range(n):
  city_list[i] = input().split(' ')

for j in range(n):
  for k in range(n):
    ret_kyori = kyori(city_list[j][0], city_list[k][0], city_list[j][1], city_list[k][1])
    total_kyori += ret_kyori

ret_value = total_kyori / n
print(ret_value)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
# 整数の入力
import copy

a = int(input())
nums = [0]*a

for i in range(a):
    nums[i] = int(input())
    
for j in range(a):
    thisnums = copy.deepcopy(nums)
    thisnums[j] = 0
    print(max(thisnums))

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
import copy

a = int(input())
nums = [0]*a

for i in range(a):
    nums[i] = int(input())
    
maxnum = max(nums)
maxenum = [i for i, x in enumerate(nums) if x == maxnum]
maxquant = len(maxenum)


if maxquant != 1:
    for j in range(a):
        print(maxnum)
else:
    for j in range(a):
        if nums[j] != maxnum:
            print(maxnum)
        else:
            copylist = copy.deepcopy(nums)
            copylist[maxenum[0]] = 0
            print(max(copylist))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())

for i in range(a):
  nums[i] = int(input())

for j in range(a):
  thisnums = nums
  thisnums[j] = 0
  print(max(thisnums))

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
import copy

a = int(input())
nums = [0]*a

for i in range(a):
    nums[i] = int(input())
    
maxnum = max(nums)
maxenum = [i for i, x in enumerate(nums) if x == maxnum]
maxquant = len(maxenum)


if maxquant != 1:
    for j in range(a):
        print(maxnum)
else:
    for j in range(a):
        if nums[j] != maxnum:
            print(maxnum)
        else:
            copylist = copy.deepcopy(nums)
            copylist[maxenum[0]] = 0
            print(max(copylist))
Buggy python submission (verdict: Runtime Error):
n, l = map(int, input().split())
strs = []

for i in range(l):
    strs.append(input())

strs.sort()
print(''.join(strs))

Fixed submission:
n, l = map(int, input().split())
strs = []

for i in range(n):
    strs.append(input())

strs.sort()
print(''.join(strs))

Buggy python submission (verdict: Runtime Error):
n, l = map(int, input().split())
strs = []

for i in range(l):
    strs.append(input())

strs.sort()
print(''.join(strs[:n]))

Fixed submission:
n, l = map(int, input().split())
strs = []

for i in range(n):
    strs.append(input())

strs.sort()
print(''.join(strs))
Buggy python submission (verdict: Runtime Error):
s = input()
print("ABC") if a[1] == "R" else print("ARC")

Fixed submission:
s = input()
print("ABC") if s[1] == "R" else print("ARC")
Buggy python submission (verdict: Runtime Error):
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
total = 0
for i in a:
  total += a
if n < total:
  print(-1)
else:
  print(n - total)


Fixed submission:
n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
total = 0
for i in a:
  total += i
if n < total:
  print(-1)
else:
  print(n - total)
Buggy python submission (verdict: Runtime Error):
n ,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort().reverse()
total = 0
for i in a:
  total += i
ok = 0
for i in range(m):
  if a[i] >= total / (4 * m):
    ok += 1
 
if ok != m:
  print("No")
else:
  print("Yes")

Fixed submission:
n ,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
total = 0
for i in a:
  total += i
ok = 0
for i in range(1, m + 1):
  if a[-i] >= total / (4 * m):
    ok += 1

if ok != m:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
s = input()
s_len = len(s)

def judge(start=0, end=s_len)
  for i in range(start, end):
    if s[start+i] == s[end-1-i]:
      continue
    else:
      return 1
  return 0

if not judge() and not judge(end=(s_len-1)//2) and not judge(start=(s_len+3)//2-1):
  print("Yes")
else:
  print("No")

Fixed submission:
s = input()
s_len = len(s)
 
def judge(start=0, end=s_len):
  for i in range(start, end):
    if s[i] == s[end-1-i]:
      continue
    else:
      return 0
  return 1
 
if judge() and judge(end=(s_len-1)//2) and judge(start=(s_len+3)//2-1):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
s = input()
s_len = len(s)
if s_len % 2:
  print("No")
else:
  prev = 0
  count = 0
  for i in range(1, (s_len//2)+1):
    if [prev:i*2] != "hi":
      print("No")
      break
    else:
      count += 1
      prev = i * 2
  if count == s_len:
    print("Yes")

Fixed submission:
s = input()
s_len = len(s)
if s_len % 2:
  print("No")
else:
  prev = 0
  count = 0
  for i in range(1, (s_len//2)+1):
    if s[prev*2:i*2] != "hi":
      print("No")
      break
    else:
      count += 1
      prev = i
  if count == s_len // 2:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
s = input()
s_len = len(s)
if s_len % 2:
  print("No")
else:
  prev = 0
  count = 0
  for i in range(1, (s_len//2)+1):
    if [prev:i*2] != "hi":
      print("No")
      break
    else:
      count += 1
  if count == s_len:
    print("Yes")

Fixed submission:
s = input()
s_len = len(s)
if s_len % 2:
  print("No")
else:
  prev = 0
  count = 0
  for i in range(1, (s_len//2)+1):
    if s[prev*2:i*2] != "hi":
      print("No")
      break
    else:
      count += 1
      prev = i
  if count == s_len // 2:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
a, b = input().split() # a = result * 0.08, b = result * 0.1
a, b = int(a), int(b)
 
result_a = int(a / 0.08)
result_b = int(b / 0.1)
 
if result_a > result_b:
  if int(result_a * 0.08) == a:
    result_a += 1
  c = int(result_a * 0.1)
  if b == c:
    print(result_a)
  else:
    print(-1)
else:
  c = int(result_b * 0.08)
  if a == c:
    print(result_b)
  else:
    print(-1)

Fixed submission:
S = input()

flag_a = 0
flag_b = 0
for i in range(3):
  if S[i] == "A":
    flag_a += 1
  else:
    flag_b += 1
if flag_a and flag_b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
s = input("")                                                                                                           t = input("")                                                                                                           s_list = list(s)                                                                                                        t_list = list(t)                                                                                                        n = 0                                                                                                                                                                                                                                           for i in range(3):                                                                                                          if s_list[i] == t_list[i]:                                                                                                  n += 1                                                                                                                                                                                                                                  print(n)  s = input("")                                                                                                           t = input("")                                                                                                           s_list = list(s)                                                                                                        t_list = list(t)                                                                                                        n = 0                                                                                                                                                                                                                                           for i in range(3):                                                                                                          if s_list[i] == t_list[i]:                                                                                                  n += 1                                                                                                                                                                                                                                  print(n)  

Fixed submission:
s = input("")
t = input("")
s_list = list(s)
t_list = list(t)
n = 0

for i in range(3):
    if s_list[i] == t_list[i]:
        n += 1

print(n)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
s = input("")
t = input("")
s_list = list(s)
t_list = list(t)
n = 0

for i in range(3):
  if s_list.get(i) = t_list.get(i):
    n += 1
print(n)

Fixed submission:
s = input("")
t = input("")
s_list = list(s)
t_list = list(t)
n = 0

for i in range(3):
    if s_list[i] == t_list[i]:
        n += 1

print(n)