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

Fixed submission:
"""
N段の階段 M個の階段が壊れている
"""

N, M = map(int, input().split())
arr = [int(input()) for _ in range(M)]
no_step =[0]*N

if N==1:
    print(1)
    exit()

for i in range(M):
    no_step[arr[i]-1]=1

count = [0]*N
if no_step[0]==0:
    count[0]=1

if no_step[1]==1:
    count[1]=0
elif no_step[0]==0 and no_step[1]==0:
    count[1]=2
elif no_step[0]==1 and no_step[1]==0:
    count[1]=1

for i in range(3,N+1,1):
    count[i-1] = count[i-2]+count[i-3]
    if no_step[i-1] == 1:
        count[i-1] = 0

ans =count[N-1]%1000000007
print(ans)

Buggy submission (verdict: Runtime Error):
"""
N段の階段 M個の階段が壊れている
"""

N, M = map(int, input().split())
arr = [int(input()) for _ in range(M)]
no_step =[0]*N

for i in range(M):
    no_step[arr[i]-1]=1

count = [0]*N
if no_step[0]==0:
    count[0]=1

if no_step[1]==1:
    count[1]=0
elif no_step[0]==0 and no_step[1]==0:
    count[1]=2
elif no_step[0]==1 and no_step[1]==0:
    count[1]=1

for i in range(3,N+1,1):
    count[i-1] = count[i-2]+count[i-3]
    if no_step[i-1] == 1:
        count[i-1] = 0

ans =count[N-1]%1000000007
print(ans)

Buggy submission (verdict: Runtime Error):
"""
N段の階段 M個の階段が壊れている
"""

N, M = map(int, input().split())
arr = [int(input()) for _ in range(M)]
no_step =[0]*N

for i in range(M):
    no_step[arr[i]-1]=1

count = [0]*N
if no_step[0]==0:
    count[0]=1

if no_step[1]==1:
    count[1]=0
elif no_step[0]==0 and no_step[1]==0:
    count[1]=2
elif no_step[0]==1 and no_step[1]==0:
    count[1]=2

for i in range(3,N+1,1):
    count[i-1] = count[i-2]+count[i-3]
    if no_step[i-1] == 1:
        count[i-1] = 0

print(count[-1]%1000000007)
Problem p02629 (python)

Fixed submission:
n=int(input())
b=""

while n>0:
  n-=1
  b+=chr(ord("a")+n%26)
  n=n//26
  
print(b[::-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
q=int(input())
for i in range(q):
  b,c=map(int,input().split())
  
  for j in range(n):
    if a[j]==b:
      a[j]=c
  print(sum(a))
Problem p02707 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
A=[0]*n
for i in range(n-1):
  A[a[i]-1]+=1
for i in range(n):
  print(A[i])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=input().split()
a=sorted(a)
count=1
ans=0

for i in range(n-2):
  if a[i]==a[i+1]:
    count+=1
  else:
    print(count)
    ans+=1
    count=1

if a[-2]==a[-1]:
  print(count)
  ans+=1
else:
  print(1)
  ans+=1
  
if ans!=n:
  for i in range(n-ans):
    print(0)
Problem p02711 (python)

Fixed submission:
n=input()
if n[0]=='7' or n[1]=='7' or n[2]=='7':
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n=input()
if n[1]=='7' or n[2]=='7' or n[3]=='7':
  print('Yes')
else:
  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):
k,n=map(int,input().split())
a=list(map(int,input().split()))
b=0
s=[0]*n
#間隔を求める
for i in range(n-1):
    s[i]=a[i+1]-a[i]
#間隔を足す
for i in range(n):
  if s[i]<k/3:
    b=b+s[i]
  else:
    con=k-s[i]
    print(con)
    exit()
  
print(b)

Buggy submission (verdict: Runtime Error):
s=input()
if s[3]==s[4] and s[5]==s[6]:
  print('Yes')
  exit()
  
print('No')
Problem p02729 (python)

Fixed submission:
n,m=map(int,input().split())
if n==2:
  count=1
else:
  count=n*(n-1)//2
  
if m==2:
  countt=1
else:
  countt=m*(m-1)//2

print(count+countt)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
  count=n*(n-1)//2
  countt=m*(m-1)//2
print(count+countt)
Problem p02777 (python)

Fixed submission:
s,t=list(map(str,input().split()))
a,b=list(map(int,input().split()))
u=str(input())

if s==u:
  a-=1
elif t==u:
  b-=1
  
print(a,b)

Buggy submission (verdict: Runtime Error):
s,t=list(map(str,input().split()))
a,b=list(map(int,input().split()))
u=str(input())

if s==u:
  a-=1
elif t==u:
  b-=1
  
print(a b)
Problem p02785 (python)

Fixed submission:
n,k=map(int,input().split())
h=map(int,input().split())
h=sorted(h)
if n<=k:
  print('0')
  exit()
  
for i in range(k):
  h[-i-1]=0
print(sum(h))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
h=[0]*10**9
h=list(map(int,input().split()))
H=max(h)

for i in range(k):
  H[i]=0

mon=0
for i in range(n):
  mon+=h[i]
  
print(mon)
Problem p02835 (python)

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

if a+b+c>=22:
  print('bust')
else:
  print('win')

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

if a+b+c>=22:
  print('bust')
else:
  print('win')
Problem p02859 (python)

Fixed submission:
r=int(input())
print(r*r)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print('-1')
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
a,b=int(input())
if a<10 and b<10:
  print(a*b)
else:
  print('No')
Problem p02659 (python)

Fixed submission:
a,b=input().split()
a=a
b=b.replace('.','')
c=int(a)*int(b)
print(c//100)

Buggy submission (verdict: Runtime Error):
a,b=map(float,input().split())
a=a
b=format(b,'2f')*100
c=int(a)*int(b)
print(c//100)
Problem p02701 (python)

Fixed submission:

def resolve():
	n = int(input())
	s = []
	d = {}
	ans = 0
	for _ in range(n):
		s.append(input())
	for i in s:
		if not d.get(i):
			ans += 1
			d[i] = True
	print(ans)
resolve()

Buggy submission (verdict: Runtime Error):
	n = int(input())
	s = []
	d = {}
	ans = 0
	for _ in range(n):
		s.append(input())
	for i in s:
		if not d.get(i):
			ans += 1
			d[i] = True
	print(ans)
resolve()
Problem p02707 (python)

Fixed submission:
def resolve():
	n = int(input())
	a = list(map(int, input().split()))
	ans = [0]*n
	for i in a:
		ans[i-1] += 1
	for i in ans:
		print(i)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    n = int(input())
	a = list(map(int, input().split()))
	ans = [0]*n
	for i in a:
		ans[i-1] += 1
	for i in ans:
		print(i)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    n = int(input())
	a = list(map(int, input().split()))
	ans = [0]*n
	for i in a:
		ans[i-1] += 1
	for i in ans:
		print(i)
resolve()
Problem p02711 (python)

Fixed submission:
def resolve():
	w = input()
	if w.find("7") > -1:
		print("Yes")
	else:
		print("No")
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
	k = int(input())
	ans = 0
	for i in range(1, k+1):
		for j in range(1, k + 1):
			for k in range(1, k + 1):
				ans += reduce(math.gcd, [i, j, k])
	print(ans)

resolve()
Problem p03286 (python)

Fixed submission:
def resolve():
	n = int(input())
	if n == 0:
		print("0")
		return
	out = []
	while n != 0:
		n, rem = divmod(n, -2)
		if rem < 0:
			n += 1
			rem -= -2
		out.append(rem)
	print("".join(map(str, out[::-1])))
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
	s = input()
	k = int(input())
	if len(s) == 1:
		print(s)
		return

	for i in s:
		if int(i) == 1:
			continue
		print(i)
		return
	print(s[0])
resolve()
Problem p03317 (python)

Fixed submission:
import math
def resolve():
	n, k = map(int, input().split())
	a = list(map(int, input().split()))
	i = a.index(min(a)) + 1
	if k - 1 > i:
		v = max(0, math.ceil((n - k - 2) / (k - 1))) + 1
	else:
		v = math.ceil(i / (k - 1)) + math.ceil((n - i - 1) / (k - 1))
	print(v)
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
	n, k = map(int, input().split())
	a = list(map(int, input().split()))
	v = math.ceil((n - k) / (k-1) + 1)
	print(v)
resolve()
Problem p03631 (python)

Fixed submission:
def resolve():
	s = input()
	print('Yes' if s[0] == s[-1] else 'No')
resolve()

Buggy submission (verdict: Runtime Error):
from math import gcd

def resolve():
	n = int(input())
	ans = int(input())
	for i in range(n-1):
		v = int(input())
		ans = ans * v // gcd(ans, v)
	print(ans)
Problem p02688 (python)

Fixed submission:
from collections import Counter

n,k = map(int, input().split())
l=[]
for i in range (k):
    d = int(input())
    a = input().split()
    lena = int(len(a))
    for j in range(lena):
        l.append(a[j])

c = Counter(l)
print(n-len(c))

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
m = int(input())
table = [[int(i) for i in input().split()] for m in range(m)]
print(a-m)
Problem p02623 (python)

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

a = [False]*N
b = [False]*M

ans = 0
now = 0
bf = 0

for i in range(N):
    if now + A[i] > K:
        break
    now += A[i]
    ans += 1
    a[i] = True

for i in range(M):
    if now + B[i] > K:
        break
    now += B[i]
    ans += 1
    b[i] = True
    bf = i

if all(a) and all(b):
    print(ans)
    exit()

if not any(a) and not any(b):
    print(ans)
    exit()

n = K - now
ans2 = ans
for i in reversed(range(N)):
    if a[i]:
        a[i] = False
        n += A[i]
        ans2 -= 1
        for j in range(bf,M):
            if not b[j]:
                if n - B[j] < 0:
                    break
                b[j] = True
                bf = j
                n -= B[j]
                ans2 += 1
    if ans2 > ans:
        ans = ans2

print(ans)

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

a = [False]*N
b = [False]*M

ans = 0
now = 0
bf = 0

for i in range(N):
    if now + A[i] > K:
        break
    now += A[i]
    ans += 1
    a[i] = True

for i in range(M):
    if now + B[i] > K:
        break
    now += B[i]
    ans += 1
    b[i] = True
    bf = i

if all(a) and all(b):
    print(ans)
    exit()

if not any(a) and not any(b):
    print(ans)
    exit()

n = K - now
ans2 = ans
for i in reversed(range(N)):
    if bf == M-1:
        break
    if a[i]:
        a[i] = False
        ans2 -= 1
        n += A[i]
        while True:
            if n - B[bf+1] < 0:
                break
            if n - B[bf+1] >= 0:
                n -= B[bf+1]
                b[bf+1] = True
                bf += 1
                ans2 += 1
    if ans2 > ans:
        ans = ans2
print(ans)
Problem p03036 (python)

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

x_ = [0] * 10

for i in range(10):
    if i == 0:
        x_[i] = r*x - D
    else:
        x_[i] = r*x_[i-1] - D
    print(x_[i])

Buggy submission (verdict: Runtime Error):
r, D, x = list(map(int, input()))

x_ = [0] * 10

for i in range(10):
    if i == 0:
        x_[i] = r*x - D
    else:
        x_[i] = r*x[i-1] - D
    print(x_[i])
Problem p03073 (python)

Fixed submission:
S = input()

if len(S) <= 2:
    print(0)

else:
    ans1 = 0
    ans2 = 0
    flag1 = 0
    flag2 = 1
    for i in S:
        if flag1 % 2 == int(i):
            pass
        else:
            ans1 += 1
        flag1 += 1
    for i in S:
        if flag2 % 2 == int(i):
            pass
        else:
            ans2 += 1
        flag2 += 1

    print(min(ans1,ans2))

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

if len(S) <= 2:
    print(0)

else:
    ans1 = 0
    ans2 = 0
    flag1 = 0
    flag2 = 1
    for i in S:
        if flag1 % 2 == int(i):
            pass
        else:
            ans1 += 1
        flag1 += 1
    for i in S:
        if flag2 % 2 == int(i):
            pass
        else:
            ans2 += 1
        flag2 += 1

print(min(ans1,ans2))
Problem p03307 (python)

Fixed submission:
N = int(input())

if N % 2 == 0:
    print(N)
else:
    print(2*N)

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

gcd = lambda a, b: gcd(b, a % b)

lcm = lambda a, b: a * b // math.gcd(a, b)

lcm(2, N)

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

import math

lcm = lambda a, b: a * b // math.gcd(a, b)

print(lcm(2, N))

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

import math

lcm = lambda a, b: a * b // math.gcd(a, b)

print(lcm(2, N))

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

import math

lcm = lambda a, b: a * b // math.gcd(a, b)

lcm(2, N)
Problem p02571 (python)

Fixed submission:
s = input()
t = input()
max_count = 0

for i in range(len(s)-len(t)+1):
    count = 0
    s_ = s[i:i+len(t)+1]
    for j in range(len(t)):
        if s_[j] == t[j]:
            count += 1
    max_count = max(max_count, count)

print(len(t) - max_count)

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
max_len = 0

for i in range(len(t)):
    for j in range(i, len(t)+1):
        print(t[i:j])
        if t[i:j] in s[i:len(s)-j+1]:
            max_len = max(max_len, j-i)

print(len(t) - max_len)
Problem p02572 (python)

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

sum_ = 0
temp = 0
for i in range(len(a)-1):
    temp += a[-i-1]
    sum_ += temp * a[-i-2]

print(sum_%(10**9 + 7))

Buggy submission (verdict: Runtime Error):
sum_ = 0
temp = 0
for i in range(len(a)-1):
    temp += a[-i-1]
    sum_ += temp * a[-i-2]

print(sum_%(10**9 + 7))
Problem p02689 (python)

Fixed submission:
n,m = map(int, input().split())
H = [int(a) for a in input().split()]
ans= [1] * n
for i in range(m):
    a, b = map(int, input().split())
    if H[a-1] > H[b-1]:
        ans[b-1] = 0
    elif H[a-1] == H[b-1]:
        ans[a-1] = 0
        ans[b-1] = 0
    elif H[a-1] < H[b-1]:
        ans[a-1] = 0
print(sum(ans))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
H = [int(a) for a in input().split()]
ans= [1] * n
for i in range(m):
    a, b = map(int, input().split())
    if H[a-1] > H[b-1]:
        ans[b] = 0
    elif H[a-1] == H[b-1]:
        ans[a-1] = 0
        ans[b-1] = 0
    else:
        ans[a-1] = 0
print(sum(ans))
Problem p02753 (python)

Fixed submission:
N=[s for s in input()]
if 'A' in N and 'B' in N:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = input()
nq = int(input())
flg = 0
front = []
back = []
for i in range(nq):
    q = input()
    if len(q) == 1:
        #flg += 1
        flg = (flg+1)%2
    else:
        if flg == 0:
            if q[2] == '1':
                front = [q[-1]] + front
            else:
                back = back + [q[-1]]
        else:
            if q[2] == '1':
                back = back + [q[-1]]
            else:
                front = [q[-1]] + front
                
s = ''.join(front) + s + ''.join(back)
# if flg % 2 == 1:
#     s = s[::-1]
print(s)
Problem p03075 (python)

Fixed submission:
# coding: utf-8
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if e-a>k:
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
a,b,c,d,e,k=map(int,input())
if e-a>k:
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
a,b,c,d,e,k=map(int,input())
if e-a>k:
  print(':(')
else:
  print('Yay!')
Problem p02990 (python)

Fixed submission:
import math
n, k = map(int, input().split())

def combination(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
mod = 10**9+7
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        print(combination(n-k+1, i)*combination(k-1, i-1)%mod)

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

mod = 10**9+7
sum = 0
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    else:
        combi = math.factorial(k-1) / (math.factorial(i-1) * math.factorial(k-i))
        tmp = (math.factorial(n-k+i) / (math.factorial(n-k) * math.factorial(i)) - sum) * combi
        print(int(tmp%mod))
        sum += tmp

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

mod = 10**9+7
sum = 0
for i in range(1,k+1):
    combi = math.factorial(k-1)/(math.factorial(i-1)*math.factorial(k-i))
    
    tmp = (math.factorial(n-k+i)/(math.factorial(n-k)*math.factorial(i)) - sum) * combi
    print(int(tmp%mod))
    sum += tmp
Problem p02571 (python)

Fixed submission:
s = input()
t = input()
lent = len(t)
ans = []
if len(s) == lent:
    ans1 = 0
    for s1, t1 in zip(s, t):
        ans1 += (s1==t1)
    ans.append(ans1)
else:
    for i in range(len(s) - lent):
        ss = s[i:i+lent]
        ans1 = 0
        for s1, t1 in zip(ss, t):
            ans1 += (s1==t1)
        ans.append(ans1)
print(lent-max(ans))

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
lent = len(t)
ans = []
for i in range(len(s) - lent):
    ss = s[i:i+lent]
    ans1 = 0
    for s1, t1 in zip(ss, t):
        ans1 += (s1==t1)
    ans.append(ans1)
print(lent-max(ans))

Buggy submission (verdict: Runtime Error):
s = input()
t = input()
lent = len(t)
ans = []
for i in range(len(s) - lent):
    ss = s[i:i+lent]
    ans1 = 0
    for s1, t1 in zip(ss, t):
        ans1 += (s1==t1)
    ans.append(ans1)
print(lent-max(ans))
Problem p02623 (python)

Fixed submission:
import sys
from io import StringIO
import unittest
import os
import bisect

# 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
sys.setrecursionlimit(999999999)


def cumsum(target: []):
    result = []
    for cnt, a in enumerate(target):
        result.append(a) if cnt == 0 else result.append(result[cnt - 1] + a)
    return result


# 実装を行う関数
def resolve(test_def_name=""):
    n, m, k = map(int, input().split())
    a_s = list(map(int, input().split()))
    b_s = list(map(int, input().split()))

    sum_a_s = [0] + cumsum(a_s)
    sum_b_s = [0] + cumsum(b_s)

    # k=100として AをX冊読んだ場合の残時間のリストを作る。
    # つまり・・0=100 1=80 2=40 という感じ。
    remain_time_s = []
    for sum_a in sum_a_s:
        if sum_a > k:
            break
        remain_time_s.append(k - sum_a)

    ans = 0
    b_start = 0
    sum_b_s_rev = list(reversed(list(enumerate(sum_b_s))))

    # 最適解を求める。
    for cnt_a, remain_time in enumerate(remain_time_s):
        # Bは逆から見ていく。
        for i in range(b_start, len(sum_b_s_rev)):
            if sum_b_s_rev[i][1] > remain_time:
                b_start += 1
                continue
            ans = max(ans, cnt_a + sum_b_s_rev[i][0])
            break

    print(ans)


class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve(sys._getframe().f_back.f_code.co_name)
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """3 4 240
60 90 120
80 150 80 150"""
        output = """3"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """3 4 730
60 90 120
80 150 80 150"""
        output = """7"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """5 4 1
1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000"""
        output = """0"""
        self.assertIO(test_input, output)

    # 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
    def test_origin_1(self):
        test_input = """2 3 100
90 10
10 10 10"""
        output = """3"""
        self.assertIO(test_input, output)


# 実装orテストの呼び出し
if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        # AtCoder提出時の場合
        resolve()

    else:
        # 自PCの場合
        unittest.main()

Buggy submission (verdict: Runtime Error):
import sys
from io import StringIO
import unittest
import os
import bisect
import numpy
Problem p02707 (python)

Fixed submission:
import bisect

man_count = int(input())

infos = [int(i) for i in input().split()]
infos.sort()

next_num = 0
end = 0
for i in range(len(infos)+1):
    if i != next_num:
        print(0)
        continue

    # 速度を上げるために添え字を吹き飛ばそう。
    start = bisect.bisect_right(infos, i+1, end)  # iが始まる添え字を得る。
    print(start - end)
    end = start

    # 添え字が最後の場合 or 最後でない で切り分け必要。
    if start == len(infos):
      next_num = infos[start-1] -1
    else:
      next_num = infos[start] -1

#for i in ans:
#    print(i)

Buggy submission (verdict: Runtime Error):
import bisect

man_count = int(input())

infos = [int(i) for i in input().split()]
infos.sort()

next_num = 0
end = 0
for i in range(len(infos)+1):
    if i != next_num:
        print(0)
        continue
    # 速度を上げるために添え字を吹き飛ばそう。
    start = bisect.bisect_right(infos, i+1, end)  # iが始まる添え字を得る。
    print(start - end)
    end = start

    # 添え字が最後の場合 or 最後でない で切り分け必要。
    if start != len(infos):
        next_num = infos[start+1]
    else:
        next_num = infos[start-1]
#for i in ans:
#    print(i)
Problem p02771 (python)

Fixed submission:
# 入力の取得(空白を除く)
s = list(input().split())

# 処理
isPoor = False
if s[0] == s[1] and s[1] != s[2]:
  isPoor = True
if s[1] == s[2] and s[2] != s[0]:
    isPoor = True
if s[2] == s[0] and s[0] != s[1]:
	isPoor = True

if isPoor:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
    # 入力の取得(空白を除く)
    s = list(input().split())

    # 処理
    isPoor = False
    if s[0] == s[1] and s[1] != s[2]:
        isPoor = True
    if s[1] == s[2] and s[2] != s[0]:
        isPoor = True
    if s[2] == s[0] and s[0] != s[1]:
        isPoor = True

    if isPoor:
        print("Yes")
    else:
        print("No")
Problem p02859 (python)

Fixed submission:
import sys
from io import StringIO
import unittest
import os

# 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
sys.setrecursionlimit(999999999)


# 実装を行う関数
def resolve():
    try:
        r = int(input())

        print(pow(r, 2))

    except IndexError as err:
        print("インデックスエラー:", err.args[0])


# テストクラス
class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """2"""
        output = """4"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """100"""
        output = """10000"""
        self.assertIO(test_input, output)

    # 自作テストパターン
    def test_original(self):
        pass


# 実装orテストの呼び出し
if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        # AtCoder提出時の場合
        resolve()

    else:
        # 自PCの場合
        unittest.main(verbosity=2)

Buggy submission (verdict: Runtime Error):

# 入力の取得(空白を除く)
s = list(input().split())

# 処理
isPoor = False
if s[0] == s[1] and s[1] != s[2]:
  isPoor = True
if s[1] == s[2] and s[2] != s[0]:
    isPoor = True
if s[2] == s[0] and s[0] != s[1]:
    isPoor = True

if isPoor:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):

    # 入力の取得(空白を除く)
    s = list(input().split())

    # 処理
    isPoor = False
    if s[0] == s[1] and s[1] != s[2]:
        isPoor = True
    if s[1] == s[2] and s[2] != s[0]:
        isPoor = True
    if s[2] == s[0] and s[0] != s[1]:
        isPoor = True

    if isPoor:
        print("Yes")
    else:
        print("No")