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

Fixed submission:
import sys
import math

input = sys.stdin.readline

def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K

N, K = map(int, input().split())
arr = list(map(int, input().split()))

lo = 1
hi = int(1e9) + 1

while (lo < hi):
  m = int((lo + hi) // 2)
  if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1
print(lo)

Buggy submission (verdict: Runtime Error):
import sys
import math

input = sys.stdin.readline

def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += int(x // m)
  return need <= K

N, K = map(int, input().split())
arr = list(map(int, input().split()))

lo = 0
hi = int(1e9) + 1

while (lo < hi):
  m = int((lo + hi) // 2)
  if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1
print(lo)

Buggy submission (verdict: Runtime Error):
import sys
import math

input = sys.stdin.readline

def can(arr, m, K):
  need = 0
  for x in arr:
    if x > m:
      need += x // m
  return need <= K

N, K = map(int, input().split())
arr = list(map(int, input().split()))

lo = 0
hi = int(1e9) + 1

while (lo < hi):
  m = (lo + hi) // 2
  if (can(arr, m, K)):
    hi = m
  else:
    lo = m + 1
print(lo)
Problem p02596 (python)

Fixed submission:
import sys


a = int(input())

cur = 0
for i in range(1, 10 ** 7):
	#b = sum([(7 * (10**x)) for x in range(i + 1)])
    cur *= 10
    cur += 7
    cur %= a
    if cur == 0:
        print(i)
        sys.exit()
print(-1)

Buggy submission (verdict: Runtime Error):
import sys


a = int(input())

cur = 0
for i in range(1, 10 ** 7):
	b = sum([(7 * (10**x)) for x in range(i + 1)])
    cur %= b
    if cur == 0:
        print(i)
        sys.exit()
print(-1)
Problem p02594 (python)

Fixed submission:
n=int(input())
if n>=30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
if n>=30:
  print("Yes)
else:
  print("No")
Problem p03803 (python)

Fixed submission:
a,b=map(int,raw_input().split())
if a==1:
	a=14
if b==1:
	b=14
 
def val():

	if(a>b):
		return "Alice"
	elif b>a:
		return "Bob"
	return "Draw"
print (val())

Buggy submission (verdict: Runtime Error):
m,n=map(int,raw_input().split())
a=[]*m
b=[]*n
p=0
q=0
while(q<m):
	q+=1
	a.append(raw_input())
while(p<n):
	p+=1
	b.append(raw_input())
flag=False
# print a
# print b
for i in xrange(n):
	if not b[i] in (a[i]):
		flag=True
		break
if flag:
	print "No"
else:
	print "Yes"

Buggy submission (verdict: Runtime Error):
a,b=map(int,raw_input().split())

def val():
	if a==1 or (a>b and b!=1):
		return "ALICE"
	else:
		return "BOB"
print (val())
Problem p02594 (python)

Fixed submission:
x = int(input())

if -40 <= x and x <= 40:
    if x >= 30:
        print("Yes")
    else:
        print("No")

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

if -40 <= x and x <= 40:
    if x >= 30:
        print("Yes")
    else:
        print("No")

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

if x >= 30:
    print("Yes")
else:
    print("No")
Problem p02595 (python)

Fixed submission:
import sys


input_array = list()
N, D = map(int, input().split())
if 1 <= N and N <= 2*10**5:
    for _ in range(N):
        input_array.append(map(int, input().split()))

count = 0
for x0, x1 in input_array:
    if 0 <= D and D <= 2*10**5:
        if abs(x0) <= 2*10**5 and abs(x1) <= 2*10**5:            
            if D >= (int(x0)**2 + int(x1)**2)**(1/2):
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import sys


input = list()
N, D = sys.stdin
for item in sys.stdin:
    input.append(item)

count = 0
for item in input:
    if 1 <= N and N <= 2*10**5:
        if 0 <= D and D <= 2*10**5:
            if abs(item[0]) <= 2*10**5 and abs(item[1]) <= 2*10**5:
                if D >= (int(item[0])**2 + int(item[1])**2)**(1/2):
                    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import sys


input = list()
N, D = sys.stdin
for item in sys.stdin:
    input.append(item)

count = 0
for item in input:
    if 1 <= N and N <= 2*10**5:
        if D <= 0 and D <= 2*10**5:
            if abs(item[0]) <= 2*10**5 and abs(item[1]) <= 2*10**5:            
                if D >= (int(item[0])**2 + item(item[1])**2)**1/2:
                    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import sys


input = list()
N, D = sys.stdin

for item in sys.stdin:
    input.append(item)

count = 0
for item in input:
    if 1 <= N and N <= 2*10**5:
        if D <= 0 and D <= 2*10**5:
            if abs(item[0]) <= 2*10**5 and abs(item[1]) <= 2*10**5:            
                if D >= (int(item[0])**2 + item(item[1])**2)**1/2:
                    count += 1
print(count)
Problem p02729 (python)

Fixed submission:
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())
A = list(map(int, input().split()))
 
for i in range(len(A)):
  if i==0:
    A_temp = A[1:]
  elif i==len(A)-1:
    A_temp = A[0:len(A)-1]
  else:
    A_temp = A[:i] + A[i+1:] 
  c = collections.Counter(A_temp)
  
  co = 0
  for k in c.values():
    if k != 1 and k != 0:
      Mcon = int(k*(k-1)/2)
      co += Mcon
  print(co)

Buggy submission (verdict: Runtime Error):
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  if N==1 and M==1:
    print(0)
  else:
    Ncon = factorial(N) // factorial(2) // factorial(N - 2)
    Mcon = factorial(M) // factorial(2) // factorial(M - 2)
    print(Ncon+Mcon)
if N ==0 or N == 1:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Buggy submission (verdict: Runtime Error):
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0:
  if N==1 and M==1:
    print(0)
  else:
    Ncon = factorial(N) // factorial(2) // factorial(N - 2)
    Mcon = factorial(M) // factorial(2) // factorial(M - 2)
    print(Ncon+Mcon)
if N ==0:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0:
  print(factorial(N) // factorial(2) // factorial(N - 2))

Buggy submission (verdict: Runtime Error):
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0:
  if N==1 and M==1:
    print(0)
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0:
  print(factorial(N) // factorial(2) // factorial(N - 2))

Buggy submission (verdict: Runtime Error):
from math import factorial
print(factorial(n) // factorial(r) // factorial(n - r))

N, M = map(int, input().split())
if N != 0 and M != 0:
  if N==1 and M==1:
    print(0)
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0:
  print(factorial(N) // factorial(2) // factorial(N - 2))
Problem p02754 (python)

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

result = 0
result += N // (A + B) * A
result += min(N % (A + B), A)
print(result)

Buggy submission (verdict: Runtime Error):
N, A, B= map(int, input().split())
re += N//(A+B) *A
re += min(N%(A+B),A)
print(re)

Buggy submission (verdict: Runtime Error):
N, A, B= map(int, input().split())
re += N//(A+B) 
re += min(N%(A+B),A)
print(re)

Buggy submission (verdict: Runtime Error):
N, A, B= map(int, input().split())
a = [1]*A + [0]*B
li = []
while len(li) < N:
  li.extend(a)
li_N = li[0:N-1]
print(sum(li_N))

Buggy submission (verdict: Runtime Error):
N, A, B= map(int, input().split())
a = [1]*A + [0]*B
li = []
while len(li) < N:
  li.extend(a)
li_N = li[:N-1]
print(sum(li_N))
Problem p02595 (python)

Fixed submission:
import sys

count = 0
n, d = [int(i) for i in input().split()]
for i in range(n):
  x, y = [int(i) for i in input().split()]
  if x * x + y * y <= d * d:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
impourt sys

count = 0
n, d = [int(i) for i in input().split()]
for i in range(n):
  x, y = [int(i) for i in input().split()]
  if x * x + y * y <= d * d:
    count += 1
print(count)
Problem p02594 (python)

Fixed submission:
x = input()
x = int(x)
if x >= 30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
def main():
    N,D=map(int,input().split())
    ans=0
    for i in range(N):
        x,y=map(int,input().split())
        if x^2+y^2<=D^2:
            ans+=1
    print(ans)

main()

Buggy submission (verdict: Runtime Error):
def main():
    N,D=map(int,input().split())
    ans=0
    for _ in range(N):
        x,y=map(int,input().split())
        if x^2+y^2<=D^2:
            ans+=1
    print(ans)

main()
Problem p02594 (python)

Fixed submission:
X = int(input())
if X >= 30:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 30:
  print('Yes')
else:
  print('No'9)

Buggy submission (verdict: Runtime Error):
if X >= 30:
  print('Yes')
else :
  print('No')

Buggy submission (verdict: Runtime Error):
def yesNo(X):
  if X <= 30:
    print('Yes')
  else:
    print('No')

yesNo(X)
Problem p02596 (python)

Fixed submission:
K = int(input())
if K % 2 == 0:
    print(-1)
elif K % 5 == 0:
    print(-1)
else:
    S = 7
    for i in range(K+1):
        if S % K == 0:
            print(i+1)
            break
        else:
            S = S % K
            S = S * 10 + 7
    else:
        print(-1)

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

    for i in range(K+1):
        if int(S) % K != 0:
            S = S * 10 + 7
        else:
            print(i+1)
            break

    if i >= K:
        print('-1')

Buggy submission (verdict: Runtime Error):
K = input()
S = 7
i = 1
if (1 <= K) and (K <= (10 ** 6)):
    while True:
        if int(S) % K != 0:
            S = S * 10 + 7
            i += 1
        else:
            print(i)
            break

        if i > K:
            print('-1')
            break

Buggy submission (verdict: Runtime Error):
K = input()
S = 7
i = 1
if (1 <= K) and (K <= (10 ** 6)):
    while True:
        if int(S) % K != 0:
            S = S * 10 + 7
            i += 1
        else:
            print(i)
            break

        if i > K:
            print(-1)
            break
Problem p02753 (python)

Fixed submission:
s = input()
if (s in "AAA") | (s in "BBB"):
    print("No")
else: 
    print("Yes")

Buggy submission (verdict: Runtime Error):
s = input()
if s=="AAA" | s=="BBB":
    print("No")
else: 
    print("Yes")
Problem p02759 (python)

Fixed submission:
n = int(input())
if n%2==0:
    print(int(n/2))
else:
    print(int(n/2)+1)

Buggy submission (verdict: Runtime Error):
n = input()
if n%2==0:
    print(int(n/2))
else:
    print(int(n/2)+1)
Problem p02594 (python)

Fixed submission:
n = int(input())
if n >= 30:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = input()
if n >= 30:
  print(Yes)
else:
  print(No)
Problem p02819 (python)

Fixed submission:
import sys
input = sys.stdin.readline


x = int(input())

prime = [True] * (100004)
prime[2] = True

def e_prime(x):
	i = 2
	flag = False
	while True:
		if(i==x):flag=True
		if prime[i]:
			if(flag==True):
				return i
			else:
				for j in range(i**2,len(prime),i):
					prime[j]=False
		i+=1

print(e_prime(x))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


x = int(input())

prime = [True] * (100004)
prime[2] = True

def e_prime(x):
	i = 2
	flag = False
	if(i==x):flag=True
	while True:
		if prime[i]:
			if(flag==True):
				return i
			else:
				for j in range(i**2,len(prime),i):
					prime[j]=False
		i+=1

print(e_prime(x))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


x = int(input())

prime = [True] * (100004)
prime[2] = True

def e_prime(x):
	i = 2
	flag = False
	while True:
		if prime[i]:
			if(flag==True):
				return i
			else:
				for j in range(i**2,len(prime),i):
					prime[j]=False
		i+=1
		if(i==x):flag=True

print(e_prime(x))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


x = int(input())

prime = [True] * (1000000)
prime[2] = True

def e_prime(x):
	i = 2
	flag = False
	while True:
		if prime[i]:
			if(flag==True):
				return i
			else:
				for j in range(i**2,len(prime),i):
					prime[j]=False
		i+=1
		if(i==x):flag=True

print(e_prime(x))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


x = int(input())

prime = [True] * (1000000)
prime[2] = True

def e_prime(x):
	i = 2
	flag = False
	while True:
		if prime[i]:
			if(flag==True):
				return i
			else:
				for j in range(i**2,len(prime),i):
					prime[j]=False
		i+=1
		if(i==x):flag=True

print(e_prime(x))
Problem p02862 (python)

Fixed submission:
import sys
from collections import deque

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	X,Y = MI()
	N3 = (2*Y-X)
	M3 = (2*X-Y)
	if(N3%3!=0 or M3%3!=0 or N3 < 0 or M3<0):
		print(0)
	else:
		N=N3//3
		M=M3//3

		K = min(N,M)

		def cmb(n, r, mod):
			if ( r<0 or r>n ):
				return 0
			r = min(r, n-r)
			return g1[n] * g2[r] * g2[n-r] % mod

		mod = 10**9+7 #出力の制限
		L = 10**6
		g1 = [1, 1] # 元テーブル
		g2 = [1, 1] #逆元テーブル
		inverse = [0, 1] #逆元テーブル計算用テーブル

		for i in range( 2, L + 1 ):
			g1.append( ( g1[-1] * i ) % mod )
			inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
			g2.append( (g2[-1] * inverse[-1]) % mod )

		print(cmb(N+M,K,mod))


main()

Buggy submission (verdict: Runtime Error):
import sys
from collections import deque
from scipy.special import comb

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	X,Y = MI()
	N3 = (2*Y-X)
	M3 = (2*X-Y)
	if(N3%3!=0 or M3%3!=0 or N3 < 0 or M3<0):
		print(0)
	else:
		N=N3//3
		M=M3//3

		K = min(N,M)

		def cmb(n, r, mod):
			if ( r<0 or r>n ):
				return 0
			r = min(r, n-r)
			return g1[n] * g2[r] * g2[n-r] % mod

		mod = 10**9+7 #出力の制限
		L = 10**6
		g1 = [1, 1] # 元テーブル
		g2 = [1, 1] #逆元テーブル
		inverse = [0, 1] #逆元テーブル計算用テーブル

		for i in range( 2, L + 1 ):
			g1.append( ( g1[-1] * i ) % mod )
			inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
			g2.append( (g2[-1] * inverse[-1]) % mod )

		print(cmb(N+M,K,mod))


main()
Problem p02863 (python)

Fixed submission:
import sys
import numpy as np

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N,T = MI()
	max_T = -1
	dish = []
	for i in range(N):
		A,B = MI()
		dish.append([A,B])
		dish.sort(key=lambda x : x[0])
		max_T = max(max_T, A)

	dp=np.array([-1 for _ in range(T+max_T)])
	dp[0] = 0
	upper = 1
	for i in range(N):
		ch = (dp>=0)
		ch[T:] = False
		ch2 = np.roll(ch, dish[i][0])
		ch2[:dish[i][0]]=False
		dp[ch2] = np.maximum(dp[ch2] , dp[ch] + dish[i][1])
	print(max(dp))
main()

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

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N,T = MI()
	max_T = -1
	dish = []
	for i in range(N):
		A,B = MI()
		dish.append([A,B])
		max_T = max(max_T, A)

	dp=np.array([-1 for _ in range(T+max_T)])
	dp[0] = 0
	upper = 1
	for i in range(N):
		ch2 = (dp>=0)
		ch2[T:] = False
		ch = np.roll(ch2, dish[i][0])
		ch[:i+1]=False
		dp[ch] = np.maximum(dp[ch] , dp[ch2] + dish[i][1])
	print(max(dp[:-1]))
main()
Problem p02880 (python)

Fixed submission:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N = II()
	l = [False]*101
	for i in range(1,10):
		for j in range(1,10):
			l[i*j] = True
	if(l[N]):print("Yes")
	else:print('No')



main()

Buggy submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N = II()
	l = [False]*100
	for i in range(1,10):
		for j in range(1,10):
			l[i*j] = True
	if(l[N]):print("Yes")
	else:print('No')



main()
Problem p02623 (python)

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(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K-a[i]:
        j -= 1
    
    ans = max(ans, i+j)
    
print(ans)

Buggy submission (verdict: Runtime Error):
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(N):
    a.append(a[i]+A[1])
for i in range(M):
    b.append(b[i]+B[i])

ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K-a[i]:
        j -= 1
    
    ans = max(ans, i+j)
    
print(ans)
Problem p02725 (python)

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

d = [k-a[-1]+a[0]]

for i in range(n-1):
    d.append(a[i+1]-a[i])

print(k-max(d))

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

d = [k-a[-1]+a[0]]

for i in range(n-1):
    d.append(a[i+1]-a[i])

print(a-max(dist))
Problem p02753 (python)

Fixed submission:
s = input()
if s == 'AAA' or s == 'BBB':
  print('No')

else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
s = input()
if s == 'AAA' or s == 'BBB'
  print('No')

else print('Yes')

Buggy submission (verdict: Runtime Error):
s = input()
if s == 'AAA' or s = 'BBB'
  print('No')

else print('Yes')
Problem p02753 (python)

Fixed submission:
S = list(input())
if S[0]==S[1] and S[0]==S[2]:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
S = input()
Q = int(input())
hanten = 1
front = []
back = []
for _ in range(Q):
    q = list(map(str, input().split()))
    if q[0]=='1':
        hanten *= -1
    else:
        if hanten==1:
            if q[1]=='1':
                front.append(q[2])
            else:
                back.append(q[2])
        else:
            if q[1]=='1':
                back.append(q[2])
            else:
                front.append(q[2])


if hanten==1:
    print(''.join(list(reversed(front)) + list(S) + back))
else:
    print(''.join(list(reversed(back+list(S)))+front))

Buggy submission (verdict: Runtime Error):
S = input()
Q = int(input())
for _ in range(Q):
    q = list(map(str, input().split()))
    if q[0]=='1':
        list(S).reverse()
        S = ''.join(S)
    else:
        if q[1]=='1':
            S = q[2] + S
        else:
            S = S + q[2]

print(S)

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

q = int(N / (A+B))
r = N%(A+B)
#print((q+1)*A if r>A else q*A+r)
print(q*A + min(A, r))

Buggy submission (verdict: Runtime Error):
S = list(input())
if S[0]==S[1] and S[0]==S[3]:
    print('No')
else:
    print('Yes')
Problem p02880 (python)

Fixed submission:
def make_divisors(n):
  kuku = 'No'
  for i in range(1, int(n**0.5)+1):
    x = 100
    y = 100
    if n % i == 0:
      x = i
      y = n//i
    if x<=9 and y<=9:
      kuku = 'Yes'
      break
  return kuku
  
n = int(input())
kuku = make_divisors(n)
print(kuku)

Buggy submission (verdict: Runtime Error):
def make_divisors(n):
  kuku = False
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      x = i
      if i != n // i:
        y = n//i
    if x<=9 and y<=9:
      kuku = True
      break
  return kuku
  
n = int(input())
kuku = make_divisors(n)
print(kuku)