Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A，B，C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = set(vincent)
if len(vincent1) == 2:
  print('Yes')
else:
  print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A，B，C = list(map(str, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
  print('Yes')
else:
  print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A，B，C=list(map(int,input().split()))
vincent=[A,B,C]
vincent1=list(set(vincent))
if len(vincent1)==2:
  print('Yes')
else:
  print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A，B，C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print('Yes')
else:
    print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A，B，C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
  print('Yes')
else:
  print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A，B，C = list(map(int, input().split()))
vincent = str(A) + str(B) + str(C)
vincent1 = list(set(vincent))
if len(vincent1) == 2:
  print('Yes')
else:
  print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A，B，C = list(map(str, input().split()))
vincent = A + B + C
vincent1 = list(set(vincent))
if len(vincent1) == 2:
  print('Yes')
else:
  print('No')


Fixed submission:
A, B, C = list(map(int, input().split()))
vincent = [A,B,C]
vincent1 = list(set(vincent))
if len(vincent1) == 2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A1 = int(input())
A2 = int(input())
A3 = int(input())
if A1 + A2 + A3 >= 22:
    print("burst")
else:
    print("win")


Fixed submission:
[A1, A2, A3] = list(map(int,input().split()))
if A1 + A2 + A3 >= 22:
    print("bust")
else:
    print("win")
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
c = A + B
d = A - B
e = A * B
f = [c, d, e]
maxvalue = c
for i in range(len(f)):
    if f[i] > maxvalue:
        maxvalue = f[i]
print(maxvalue)


Fixed submission:
A, B = map(int, input().split())
c = A + B
d = A - B
e = A * B
f = [c, d, e]
maxvalue = c
for i in range(len(f)):
    if f[i] > maxvalue:
        maxvalue = f[i]
print(maxvalue)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
c = A + B
d = A - B
e = A * B
f = [c, d, e]
maxvalue = c
for i in range(len(f)):
    if f[i] > maxvalue:
        maxvalue = f[i]
print(maxvalue)


Fixed submission:
A, B = map(int, input().split())
c = A + B
d = A - B
e = A * B
f = [c, d, e]
maxvalue = c
for i in range(len(f)):
    if f[i] > maxvalue:
        maxvalue = f[i]
print(maxvalue)
Buggy python submission (verdict: Runtime Error):
S = str(input())
S1 = set(S)
if len(S1) == 2 and S.count(S1[0]) == 2 and S.count(S1[1]) == 2:
    print("Yes")
else:
    print("No")

Fixed submission:
S = str(input())
S1 = list(set(S))
if len(S1) == 2 and S.count(S1[0]) == 2 and S.count(S1[1]) == 2:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S = str(input())
S1 = set(S)
if len(S1) == 2 and S.count(S1[0]) == 2 and S.count(S1[1]):
    print("Yes")
else:
    print("No")

Fixed submission:
S = str(input())
S1 = list(set(S))
if len(S1) == 2 and S.count(S1[0]) == 2 and S.count(S1[1]) == 2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
P, Q, R = list(map(int, input().split()))
x = [P, Q, R]
maxvalue = 0
for i in x:
    if x[i] > maxvalue:
        maxvalue = x[i]
print(P + Q + R - maxvalue)

Fixed submission:
P, Q, R = list(map(int, input().split()))
x = [P, Q, R]
maxvalue = 0
for i in range(len(x)):
    if x[i] > maxvalue:
        maxvalue = x[i]
print(P + Q + R - maxvalue)
Buggy python submission (verdict: Runtime Error):
N, K = list(map(int, input().split()))
S = str(input())
m = chr(ord(S[K-1]) - 32)
print(N[:m] + m + N[m+1:])




Fixed submission:
N, K = list(map(int, input().split()))
S = str(input())
m = chr(ord(S[K-1]) + 32)
print(S[:K-1] + m + S[K:])

Buggy python submission (verdict: Runtime Error):
N, K = list(map(int, input().split()))
S = str(input())
m = chr(ord(S[K]) - 32)
print(N[:m] + m + N[m+1:])




Fixed submission:
N, K = list(map(int, input().split()))
S = str(input())
m = chr(ord(S[K-1]) + 32)
print(S[:K-1] + m + S[K:])
Buggy python submission (verdict: Runtime Error):
A, B = int(input())
h = [2*A-1, 2*B-1, A+B]
maxvalue = 0
for i in range(len(h)):
    if h[i] >= maxvalue:
        maxvalue = h[i]
print(maxvalue)

Fixed submission:
A, B = list(map(int, input().split()))
h = [2*A-1, 2*B-1, A+B]
maxvalue = 0
for i in range(len(h)):
    if h[i] >= maxvalue:
        maxvalue = h[i]
print(maxvalue)
Buggy python submission (verdict: Runtime Error):
S = str(input())
S1 = S[:4] + S[5:7] + S[8:]
S2 = int(S)
if S2 <= 20190430:
    print("Heisei")
else:
    print("TBD")

Fixed submission:
S = str(input())
S1 = S[:4] + S[5:7] + S[8:]
S2 = int(S1)
if S2 <= 20190430:
    print("Heisei")
else:
    print("TBD")
Buggy python submission (verdict: Runtime Error):
A, B, C = list(map(int, input().split()))
if A[len(A)-1] == B[0] and B[len(B)-1] == C[0]:
    print("YES")
else:
    print("No")

Fixed submission:
A, B, C = list(map(str, input().split()))
if A[len(A)-1] == B[0] and B[len(B)-1] == C[0]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
A, op, B = list(map(str, input().split()))
if op == "+":
    print(A + B)
else:
    print(A - B)


Fixed submission:
A, op, B = list(map(str, input().split()))
if op == "+":
    print(int(A) + int(B))
else:
    print(int(A) - int(B))
Buggy python submission (verdict: Runtime Error):
n = int(input())
st = str(input()).split(' ')
ans = ''
for i in range(n):
    ans += st[i][0]
    ans += st[i][1]
print(ans)

Fixed submission:
n = int(input())
st = str(input()).split(' ')
ans = ''
for i in range(n):
    ans += st[0][i]
    ans += st[1][i]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = str(input())
t = str(input())
dp = [[0]*(len(t)+1) for _ in range(len(s)+1)]
for i in range(1,len(s)+1):
    for j in range(1,len(t)+1):
        if s[i-1]==t[j-1]:
            dp[i][j] = dp[i-1][j-1] +1
        else:
            dp[i][j] = max(dp[i][j-1], dp[i-1][j])

ans = ''
i = len(s)
j = len(t)
while (i>0) & (j>0):
    if dp[i][j] == dp[i-1][j]:
        i -=1
    elif dp[i][j] == dp[i][j-1]:
        j -=1
    else:
        ans = s[i-1] +ans
        i -=1
        j -=1
print(ans)

Fixed submission:
s = str(input())
t = str(input())
dp = [[0]*(len(t)+1) for _ in range(len(s)+1)]
for i in range(1,len(s)+1):
    for j in range(1,len(t)+1):
        if s[i-1]==t[j-1]:
            dp[i][j] = dp[i-1][j-1] +1
        else:
            dp[i][j] = max(dp[i][j-1], dp[i-1][j])

ans = ''
i = len(s)
j = len(t)
while (i>0) & (j>0):
    if dp[i][j] == dp[i-1][j]:
        i -=1
    elif dp[i][j] == dp[i][j-1]:
        j -=1
    else:
        ans = s[i-1] +ans
        i -=1
        j -=1
print(ans)
Buggy python submission (verdict: Runtime Error):
ok = True
a.sort()
if n%2==0:
    for i in range(n):
        if a[i]!= i-i%2+1:
            ok = False
            break
else:
    for i in range(n):
        if a[i]!= i+i%2:
            ok = False
            break
if ok:
    print(2**(n//2)%(10**9+7))
else:
    print(0)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ok = True
a.sort()
if n%2==0:
    for i in range(n):
        if a[i]!= i-i%2+1:
            ok = False
            break
else:
    for i in range(n):
        if a[i]!= i+i%2:
            ok = False
            break
if ok:
    print(2**(n//2)%(10**9+7))
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
ok = True
cnt = n%2+1
for i in range(cnt,n,2):
    if a.count(i)!=2:
        ok = False
        break
if ok:
    print(2**(n//2))
else:
    print(0)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ok = True
a.sort()
if n%2==0:
    for i in range(n):
        if a[i]!= i-i%2+1:
            ok = False
            break
else:
    for i in range(n):
        if a[i]!= i+i%2:
            ok = False
            break
if ok:
    print(2**(n//2)%(10**9+7))
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
h = int(input())
w = int(input())
n = int(input())
count = 0
if(h >= w):
    while(n > h):
    n -= h
    count += 1
print(count)
else:
    while(n > w):
    n -= w
    count += 1
print(count)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())
ha = h
wa = w
count = 1
if(h >= w):
    while(n > ha):
        ha += h
        count += 1
    print(count)
else:
    while(n > wa):
        wa += w
        count += 1
    print(count)
Buggy python submission (verdict: Runtime Error):
n, r = map(int, input().split())
count = 0
if n = 1:
    print(1)
else:
    while n // r >= r:
        count += 1
        n = n // r
    print(count + 2)

Fixed submission:
n, r = map(int, input().split())
count = 0
if n == 1:
    print(1)
else:
    while n // r >= r:
        count += 1
        n = n // r
    print(count + 2)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, k = map(int, input().split())

for i in range(k):
    if a >= 1:
        a -= 1
    elif b >= 1:
        b -= 1
print(a, b)


Fixed submission:
a, b, k = map(int, input().split())
c = a
if k >= 1:
    if a >= k:
        a -= k
    elif a < k:
        a = 0
        k -= c
        if b >= k:
            b -= k
        elif b < k:
            b = 0

print(a, b)
Buggy python submission (verdict: Runtime Error):
import math

a, b = map(int, input().split())
c = math.gcd(a, b)
print(a*b//c)


Fixed submission:
import fractions

a, b = map(int, input().split())
c = fractions.gcd(a, b)
print(a*b//c)
Buggy python submission (verdict: Runtime Error):
L,R = map(int,input().split())
min = L*(L+1)%2019
for i in range(L,L+2019):
    for j in range(i+1,L+2019):
        if(i<j):
            if(min > (i*j)%2019):
                min = (i*j)%2019
        if(min == 0):
            break
    if(min==0)
        break
print(min)

Fixed submission:
L,R = map(int,input().split())
min = L*(L+1)%2019
a = L
b = L +1
if(R > L + 2019):
    R = L + 2019
for i in range(L,R+1):
    for j in range(i+1,R+1):
        if(i<j):
            if(min > (i*j)%2019):
                min = (i*j)%2019
                a = i
                b = j
        if(min == 0):
            break
    if(min==0):
        break
print(min)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

count = 0
tmp = 1
for i in range(1, N):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(i) for i in input().split()] + [0]

count = 0
tmp = 1
for i in range(1, N+1):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

count = 0
tmp = 1
for i in range(1, N+1):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(i) for i in input().split()] + [0]

count = 0
tmp = 1
for i in range(1, N+1):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(i)for i in input().split()]

count = 0
i = 1
while i <= (N-1):
    if A[i] == A[i - 1]:
        j = i + 1
        if j <= (N-1):
            while True:
                if A[j] == A[j - 1]:
                    count += 1
                    j += 1
                else:
                    count += 2
                    i = j
                    break
        else:
            count += 2
            break
    else:
        i += 1

print(count // 2)


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(i) for i in input().split()] + [0]

count = 0
tmp = 1
for i in range(1, N+1):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from scipy.special import perm, comb

n, m, d = [int(i) for i in input().split()]

"""
d == 0
def expectation_0(n, m, d):
    return sum([i * comb(m-1, k) * (n/n**2)**k * (1 - n/n**2)**(m-1-k) for k in range(0, m-1)])

d != 0
def expectation_0(n, m, d):
    return sum([i * comb(m-1, k) * (2(n-d)/n**2)**k * (1 - 2(n-d)/n**2)**(m-1-k) for k in range(0, m-1)])
"""
def expectation(p, m):
        return sum([k * comb(m-1, k) * p**k * (1 - p)**(m-1-k) for k in range(0, m-1)])


if d == 0:
    p = 1 / n  # n / n**2
    print(expectation(p, m))

else:
    p = 2 * (n - d) / n**2
    print(expectation(p, m))


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

n, m, d = [int(i) for i in input().split()]

"""
from scipy.special import perm, comb

d == 0
def expectation_0(n, m, d):
    return sum([i * comb(m-1, k) * (n/n**2)**k * (1 - n/n**2)**(m-1-k) for k in range(0, m-1)])

d != 0
def expectation_0(n, m, d):
    return sum([i * comb(m-1, k) * (2(n-d)/n**2)**k * (1 - 2(n-d)/n**2)**(m-1-k) for k in range(0, m-1)])

def expectation(p, m):
        return sum([k * comb(m-1, k) * p**k * (1 - p)**(m-1-k) for k in range(0, m-1)])
"""
if d == 0:
    p = 1 / n  # n / n**2
    print((m - 1) * 1/n)

else:
    p = 2 * (n - d) / n**2
    print((m - 1) * p)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import itertools

n, m, d = [int(i) for i in input().split()]

num = [i for i in range(1, n+1)]
summation = []
for lis in itertools.product(num, repeat=m):
    summation.append(len([i for i in range(len(lis)-1) if abs(lis[i+1] - lis[i]) == d]))

print(sum(summation) / n**m)


Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

n, m, d = [int(i) for i in input().split()]

"""
from scipy.special import perm, comb

d == 0
def expectation_0(n, m, d):
    return sum([i * comb(m-1, k) * (n/n**2)**k * (1 - n/n**2)**(m-1-k) for k in range(0, m-1)])

d != 0
def expectation_0(n, m, d):
    return sum([i * comb(m-1, k) * (2(n-d)/n**2)**k * (1 - 2(n-d)/n**2)**(m-1-k) for k in range(0, m-1)])

def expectation(p, m):
        return sum([k * comb(m-1, k) * p**k * (1 - p)**(m-1-k) for k in range(0, m-1)])
"""
if d == 0:
    p = 1 / n  # n / n**2
    print((m - 1) * 1/n)

else:
    p = 2 * (n - d) / n**2
    print((m - 1) * p)
Buggy python submission (verdict: Runtime Error):
def gcd(a, b):
    a = int(a)
    b = int(b)
    m = int(0)
    while(b > 0):
        m = a 
        a = b
        b = m % a
    return a
    

def lcm(a, b):
    return int(a * b / gcd(a, b))

n = int(input())
t = []
for i in range(0, n):
    t.append(int(input()))
cur = t[0]
for i in range(1, n):
    cur = lcm(cur, t[i])
print(int(cur))

Fixed submission:
def gcd(a, b):
    a = int(a)
    b = int(b)
    m = int(0)
    while(b > 0):
        m = a 
        a = b
        b = m % a
    return a
    

def lcm(a, b):
    return int(a * b // gcd(a, b))

n = int(input())
t = []
for i in range(0, n):
    t.append(int(input()))
cur = t[0]
for i in range(1, n):
    cur = lcm(cur, t[i])
print(int(cur))

Buggy python submission (verdict: Runtime Error):
def gcd(a, b):
    m = 0
    res = 0
    while(b > 0):
        m = a 
        a = b
        b = m % a
        res = a
    return res
    

def lcm(a, b):
    return a * b / gcd(a, b)

n = int(input())
t = []
for i in range(0, n):
    t.append(int(input()))
cur = t[0]
for i in range(1, n):
    cur = lcm(cur, t[i])
print(int(cur))

Fixed submission:
def gcd(a, b):
    a = int(a)
    b = int(b)
    m = int(0)
    while(b > 0):
        m = a 
        a = b
        b = m % a
    return a
    

def lcm(a, b):
    return int(a * b // gcd(a, b))

n = int(input())
t = []
for i in range(0, n):
    t.append(int(input()))
cur = t[0]
for i in range(1, n):
    cur = lcm(cur, t[i])
print(int(cur))
Buggy python submission (verdict: Runtime Error):
N,X=map(int,input().split())
list=list(map(int,input().split()))
sum=0
cnt=1
for i in range(N+1):
    sum+=list[i]
    if sum <=X:
        cnt+=1
    else:
        break
print(cnt)


Fixed submission:
N,X=map(int,input().split())
list=list(map(int,input().split()))
sum=0
cnt=1
for i in range(N):
    sum+=list[i]
    if sum <=X:
        cnt+=1
    else:
        break
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
set1=set()
set2=set()
L,R=map(int,input().split())
for i in range(L,R+1):
    set1.add(i)
min=min(set1)
max=max(set1)+1
for i in range(M-1):
    L,R=map(int,input().split())
    if min <= L:
        min=L
    if max >= R+1:
        max=R+1
    for j in range(min,max):
        set2.add(j)
    set1=set1&set2
    set2.clear()
print(len(set1))


Fixed submission:
N,M=map(int,input().split())
set1=set()
L,R=map(int,input().split())
for i in range(L,R+1):
    set1.add(i)
min=min(set1)
max=max(set1)
Flag=True
for i in range(M-1):
    L,R=map(int,input().split())
    if R < min:
        Flag=False
        break
    elif L > max:
        Flag=False
        break
    if L >= min and max >= L:
        min = L
    if R >= min and max >= R:
        max = R
if Flag:
    print(max-min+1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
N,M=map(int,input().split())
set1=set()
set2=set()
L,R=map(int,input().split())
for i in range(L,R+1):
    set1.add(i)
for i in range(M-1):
    L,R=map(int,input().split())
    for j in range(L,R+1):
        set2.add(j)
    set1=set1&set2
    set2.clear()
print(len(set1))


Fixed submission:
N,M=map(int,input().split())
set1=set()
L,R=map(int,input().split())
for i in range(L,R+1):
    set1.add(i)
min=min(set1)
max=max(set1)
Flag=True
for i in range(M-1):
    L,R=map(int,input().split())
    if R < min:
        Flag=False
        break
    elif L > max:
        Flag=False
        break
    if L >= min and max >= L:
        min = L
    if R >= min and max >= R:
        max = R
if Flag:
    print(max-min+1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
H,W=map(int,input().split())
st=set()
list=list()
for i in range(H):
    S=input()
    if S.count('.') != W:
        list.append(S)
    tmp=[*S]
    tmp=[int(i) for i,x in enumerate(tmp) if x == '.']
    if not st:
        tmp_set = set(tmp)
        st=st.union(tmp_set)
    else:
        tmp_set = set(tmp)
        st &=tmp_set
for x in list:
    str=''
    if not st:
        for i in range(W):
            str+=x[i]
    else:
        for i in range(W):
            if i not in st:
                str+=x[i]
    print(str)
    str=''

Fixed submission:
H,W=map(int,input().split())
st=set()
list=list()
for i in range(H):
    S=input()
    if S.count('.') != W:
        list.append(S)
    tmp=S
    tmp=[int(i) for i,x in enumerate(tmp) if x == '.']
    if not st:
        tmp_set = set(tmp)
        st=st.union(tmp_set)
    else:
        tmp_set = set(tmp)
        st &=tmp_set
for x in list:
    str=''
    if not st:
        for i in range(W):
            str+=x[i]
    else:
        for i in range(W):
            if i not in st:
                str+=x[i]
    print(str)
    str=''

Buggy python submission (verdict: Runtime Error):
H,W=map(int,input().split())
set1=set()
list=list()
for i in range(H):
    S=input()
    if S.count('.') != W:
        list.append(S)
    tmp=[*S]
    tmp=[int(i) for i,x in enumerate(tmp) if x == '.']
    if not set1:
        tmp_set = set(tmp)
        set1=set1.union(tmp_set)
    else:
        tmp_set = set(tmp)
        set1 &=tmp_set
for x in list:
    str=''
    if not set1:
        for i in range(W):
            str+=x[i]
    else:
        for i in range(W):
            if i not in set1:
                str+=x[i]
    print(str)
    str=''


Fixed submission:
H,W=map(int,input().split())
st=set()
list=list()
for i in range(H):
    S=input()
    if S.count('.') != W:
        list.append(S)
    tmp=S
    tmp=[int(i) for i,x in enumerate(tmp) if x == '.']
    if not st:
        tmp_set = set(tmp)
        st=st.union(tmp_set)
    else:
        tmp_set = set(tmp)
        st &=tmp_set
for x in list:
    str=''
    if not st:
        for i in range(W):
            str+=x[i]
    else:
        for i in range(W):
            if i not in st:
                str+=x[i]
    print(str)
    str=''
Buggy python submission (verdict: Runtime Error):
import sympy
N=int(input())
list=list()
for i in range(105,N+1,2):
    dict=sympy.factorint(i)
    result=2**sum(dict.values())
    if result >=8:
        list.append(i)
print(len(list))


Fixed submission:
N=int(input())
list=list()
cnt=0
for i in range(105,N+1,2):
    list=[j for j in range(1,200)if i%j<1]
    if len(list) >=8:
        cnt+=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
print(int(int(input)/3))

Fixed submission:
print(int(int(input())/3))
Buggy python submission (verdict: Runtime Error):
N = int(input())
print('Yes' if N%1000%111 == 0 or N%1110 < 10)


Fixed submission:
N = int(input())
print('Yes' if N%1000%111 == 0 or N%1110 < 10 else 'No')
Buggy python submission (verdict: Time Limit Exceeded):
s=input()
t=input()
l=len(s)
sl=[]
tl=[]
slist=[]
tlist=[]
flag=0
for i in range(l):
    if not i in slist:
        si=s[i]
        for j in range(l):
            if s[j]==si:
                slist.append(j)
    if not i in tlist:
        ti=t[i]
        for j in range(l):
            if t[j]==ti:
                tlist.append(j)
    if slist!=tlist:
        flag=1
        break
if flag==1:
    print('No')
else:
    print('Yes')

Fixed submission:
s=input()
t=input()
l=len(s)
sl=[]
tl=[]
slist=[0]*26
tlist=[0]*26
flag=0
sabc=''
tabc=''
for i in range(l):
    sb=not s[i] in sabc
    tb=not t[i] in tabc
    if sb:
        sabc+=s[i]
    else:
        slist[sabc.find(s[i])]+=1
    if tb:
        tabc+=t[i]
    else:
        tlist[tabc.find(t[i])]+=1
    
    if slist!=tlist:
        flag=1
        break
if flag==1:
    print('No')
else:
    print('Yes')