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

Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = list(int(input()) for i in range(N))
sum = 0
for i in range(N):
    B = 0
    while B * A[i] + 1 <= D:
        B += 1
        sum += 1
print(X + sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
D, X = map(int, input().split())
A = list(input() for i in range(N))
sum = 0
for i in range(N):
    B = 0
    while B * A[i] + 1 <= D:
        B += 1
        sum += 1
print(X + sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
D, X = map(int, input().split())
A = list(input() for i in range(N))
sum = 0
for i in range(N):
    B = 0
    while B * A[i + 1] + 1 <= D:
        B += 1
        sum += 1
print(X + sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
D, X = map(int, input().split())
A = list(input() for i in range(N))
sum = 0
for i in range(N):
    while i * A[i] + 1 <= D:
        sum += 1
print(X + sum)
Problem p03408 (python)

Fixed submission:
N = int(input())
s = list(input() for i in range(N))
M = int(input())
t = list(input() for i in range(M))

s_set = list(set(s))
ans = 0
for name in s_set:
    count = s.count(name) - t.count(name)
    ans = max(count, ans)

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = list(input() for i range(N))
M = int(input())
t = list(input() for i range(M))

s_set = list(set(s))
ans = 0
for name in s_set:
    count = s.count(name) - t.count(name)
    ans = max(count, ans)

print(ans)

Buggy submission (verdict: Runtime Error):
N = input()
s = list(input() for i range(N))
M = input()
t = list(input() for i range(M))

s_set = list(set(s))
ans = 0
for name in s_set:
    count = s.count(name) - t.count(name)
    ans = max(count, ans)
    
print(ans)
Problem p03434 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
asort = sorted(a, reverse=True)
A = 0
B = 0
for i in range(N):
    if i % 2 == 0:
        A += asort[i]
    else:
        B += asort[i]

print(A - B)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = sorted(list(map((int, input().split())), reverse=True))
A = 0
B = 0
for i in range(N):
    if i % 2 == 0:
        A += a[i]
    else:
        B += a[i]

print(A - B)
Problem p03448 (python)

Fixed submission:
arr = [input() for i in range(4)]
count = 0
sum = 0
for fihun in range(int(arr[0]) + 1):
    for hun in range(int(arr[1]) + 1):
        for fi in range(int(arr[2]) + 1):
            sum = fihun * 500 + hun * 100 + fi * 50
            if sum == int(arr[3]):
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
arr = input() for i in range(4)
count = 0
sum = 0
for fihun in range(int(arr[0]) + 1):
    for hun in range(int(arr[1]) + 1):
        for fi in range(int(arr[2]) + 1):
            sum = fihun * 500 + hun * 100 + fi * 50
            if sum == int(arr[3]):
                count += 1
print(count)

Buggy submission (verdict: Runtime Error):
arr = input() for i in range(4)
count = 0
sum = 0
for fihun in range(int(arr[0]) + 1):
    for hun in range(int(arr[1]) + 1):
        for fi in range(int(arr[2]) + 1):
            sum = fihun * 500 + hun * 100 + fi * 50
            if sum == int(range[3]):
                count += 1
print(count)
Problem p03474 (python)

Fixed submission:
a,b=map(int,input().split())
S=input()
if len(S) == a + b + 1 and S[a] == '-' and S.count('-') == 1:
    print('Yes')
else:
    print('No')

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

s.sort()
s=''.join(s)#辞書順最小=辞書で一番最初

t.sort()
t.reverse()
t=''.join(t)#辞書順最大

if s<t:
    print('Yes')
else:
    print('No')
Problem p03485 (python)

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

print(math.ceil((a + b) / 2))

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

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

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

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

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input(), split())
print(int((a * b) / 2))
Problem p03486 (python)

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

ss=''.join(sorted(s))#辞書順最小=辞書で一番最初
tt=''.join(sorted(t,reverse=True))#辞書順最大

if ss<tt:
    print('Yes')
else:
    print('No')

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

s.sort()
s=''.join(s)#辞書順最小=辞書で一番最初

t.sort()
t.reverse()
t=''.join(t)#辞書順最大

if s<t:
    print('Yes')
else:
    print('No')
Problem p03385 (python)

Fixed submission:
S = input()
if S[0] != S[1] != S[2] != S[0]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
l = []
for i in range(A, B+1):
    l.append(i)
    
if B - (A-1) < 2*K:
    for j1 in l:
        print(j1)
else:
    m = l[:K] + l[-K:]
    for j in m:
        print(j)
Problem p03337 (python)

Fixed submission:
A, B= map(int, input().split())
ans = max(A+B, A-B, A*B)
print(ans)

Buggy submission (verdict: Runtime Error):
A, B= map(int, input().split())
ans = max(A+B, A-B, A*B)
print async
Problem p03372 (python)

Fixed submission:
N, C = map(int, input().split())
x = []
v = []
for i in range(N):
    a, b = map(int, input().split())
    x.append(a)
    v.append(b)

R = [0] * N
L = [0] * N
for i in range(N):
    if i == 0:
        R[i] = v[i] - x[i]
        L[N-1-i] = v[N-1-i] - (C - x[N-1-i])
    else:
        R[i] = R[i - 1] + v[i] - (x[i] - x[i - 1])
        L[N-1-i] = L[N-i] + v[N-1-i] - (x[N-i] - x[N-1-i])

Rmax = [0] * N
Lmax = [0] * N
for i in range(N):
    if i == 0:
        Rmax[i] = R[i]
        Lmax[N-1-i] = L[N-1-i]
    else:
        Rmax[i] = max(Rmax[i-1], R[i])
        Lmax[N-1-i] = max(Lmax[N-i], L[N-1-i])

R2L = 0
L2R = 0
for i in range(N-1):
    R2L = max(R2L, R[i] - x[i] + Lmax[i+1])
    L2R = max(L2R, L[i+1] - (C - x[i+1]) + Rmax[i])

print(max(0, max(R), max(L), R2L, L2R))

Buggy submission (verdict: Runtime Error):
 N, C = map(int, input().split())
 x = []
 v = []
 for i in range(N):
     a, b = map(int, input().split())
     x.append(a)
     v.append(b)

 R = [0] * N
 L = [0] * N
 R2L = 0
 L2R = 0
 for i in range(N):
     R[i] = sum(v[:i+1]) - x[i]
     L[i] = sum(v[-i-1:]) - (C - x[-i-1])
     if i < N - 1:
         R2L = max(R2L, R[i] - x[i] + max(L[:N-1-i]))
         L2R = max(L2R, L[i] - (C - x[-i-1]) + max(R[:N-1-i]))

 print(max(0, max(R), max(L), R2L, L2R))

Buggy submission (verdict: Runtime Error):
N, C = map(int, input().split())
x = []
v = []
for i in range(N):
    a, b = map(int, input().split())
    x.append(a)
    v.append(b)

clock = [0] * N
antiClock = [0] * N
for i in range(N):
    clock[i] = sum(v[:i+1]) - x[i]
    antiClock[i] = sum(v[i:]) - (C - x[i])
clockMax = max(clock)
antiClockMax = max(antiClock)

clock2antiClock = max([(clock[i] - x[i] + max(antiClock[i+1:])) for i in range(N-1)])
antiClock2clock = max([(antiClock[i] - (C - x[i]) + max(clock[:i])) for i in range(1, N)])

print(max(0, clockMax, antiClockMax, clock2antiClock, antiClock2clock))
Problem p03377 (python)

Fixed submission:
# coding: utf-8

A, B, X = map(int, input().split())

if X >= A and X - A <= B:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
Y = sorted(X)

for i in range(len(X)):
    candi = Y[int(N/2)-1]
    if X[i] <= candi:
        print(Y[int(N/2)])
    else:
        print(Y[int(N/2)-1])
Problem p03380 (python)

Fixed submission:
# coding:utf-8

n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)

MAX = 0
n = a.pop(0)
b = [abs(i - n / 2) for i in a]
r = a[b.index(min(b))]
print(n, r)

Buggy submission (verdict: Runtime Error):
# coding:utf-8

def comb(n, r):
    n, r = max(n, r), min(n, r)
    nume = 1
    deno = 1
    for i in range(n-r+1, n+1):
        nume *= i
    for i in range(1, r+1):
        deno *= i
    return int(nume/deno)

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

MAX = 0
n = 0
r = 0
for ni in range(0, len(a)):
    for ri in range(ni + 1, len(a)):
        buf = comb(a[ni], a[ri])
        if buf > MAX:
            MAX = buf
            n = a[ni]
            r = a[ri]

print(n, r)
Problem p03320 (python)

Fixed submission:
K = int(input())
ans = [10**16]
c = 10**15-1
s = 10**15

for i in range(12,0,-1):
    c = 10**i - 1
    for j in range(999,99,-1):
        C = j * (10**i) + c
        S = C/sum(list(map(int, str(C))))
        if S <= s:
            ans.append(C)
            s = S
for i in range(1,10):
    ans += [i,i*10+9,i*100+99]
ans.sort()    
if K > len(ans):
    K = len(ans)
for i in range(K):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
K = int(input())
ans = [10**15]
c = 10**15-1
s = 10**15

for i in range(11,0,-1):
    c = 10**i - 1
    for j in range(999,99,-1):
        C = j * (10**i) + c
        S = C/sum(list(map(int, str(C))))
        if S <= s:
            ans.append(C)
            s = S
for i in range(1,10):
    ans += [i,i*10+9,i*100+99]
ans.sort()    
for i in range(K):
    print(ans[i])
Problem p03813 (python)

Fixed submission:
input_line = int(input())

if input_line >= 1200:
	print("ARC")
else:
	print("ABC")

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

if input_line >= 1200
	print("ARC")
else
	print("ABC")
Problem p03316 (python)

Fixed submission:
n = int(input())
li = list(str(n))
li_ = [int(i) for i in li]
allSum = sum(li_)
if not n % allSum: print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
n = input()
li = list(str(n))
li_ = [int(i) for i in li]
allSum = sum(li_)
if not n % allSum: print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
n = input()
li = list(str(n))
li = list(map(int, li))
sn = sum(li)
if ( n % sn ): print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
n = input()
li = list(n)
li = list(map(int, li))
sn = sum(li)
if ( n % sn ): print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
li = list(n)
sn = sum(li)
if ( n % sn ): print("Yes")
else: print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
li = list(n)
sn = sum(li)
if ( n % sn ): print("No")
else: print("Yes")
Problem p03323 (python)

Fixed submission:
a, b = map(int, input().split())
if a>8 or b>8: print(":(")
else: print("Yay!")

Buggy submission (verdict: Runtime Error):
a, b = input().split()
if a > 8 or b > 8: print(":(")
else: print("Yay!")
Problem p03325 (python)

Fixed submission:
l = int(input())
li = list(map(int, input().split()))
m = 0
for i in range(l):
  n = li[i]
  while not n % 2:
    m += 1
    n /= 2
else:
  print(m)

Buggy submission (verdict: Runtime Error):
l = input()
li = list(map(int, input().split()))
m = 0
for i in range(l):
  n = li[i]
  while not n % 2:
    m += 1
    n /= 2
else:
  print(m)

Buggy submission (verdict: Runtime Error):
l = input()
li = list(map(int, input().split()))
m = 0
for i in l:
  n = li[i]
  while not n % 2:
    m += 1
    n /= 2
else:
  print(m)
Problem p03813 (python)

Fixed submission:
n = int(input())
if n < 1200: print("ABC")
else: print("ARC")

Buggy submission (verdict: Runtime Error):
rate = int(input())
if n < 1200: print("ABC")
else: print("ARC")
Problem p03828 (python)

Fixed submission:
mod = 1000000000 + 7

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])
    if temp != 1:
        arr.append([temp, 1])
    if arr == []:
        arr.append([n, 1])
    return arr

n = int(input())
dat = [0] * 2000 # 約数として求められたある数の合計

# N! の各要素の素因数分解をする
res = 1
for i in range(1, n + 1):
    d = factorization(i)
    for j in range(len(d)):
        dat[d[j][0]] += d[j][1]

for i in range(2, n + 1):
    res *= (dat[i] + 1)
    res %= mod

print(res)

Buggy submission (verdict: Runtime Error):
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)
 
n = int(input())
n_bikkuri = factorial(n)
 
total = 1
 
for i in range(2, n_bikkuri+1):
  n_b = n_bikkuri
  while(n_b % i == 0):
    total += 1
    n_b /= i
  
print(total % int(1e9+7))

Buggy submission (verdict: Runtime Error):
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)
 
n = int(input())
n_bikkuri = factorial(n)
 
total = 1
 
for i in range(2, n_bikkuri+1):
  n_b = n_bikkuri
  while(not n_b % i):
    total += 1
    n_b /= i
  
print(total % int(1e9+7))

Buggy submission (verdict: Runtime Error):
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)
 
n = int(input())
n_bikkuri = factorial(n)
 
total = 1
 
for i in range(2, n_bikkuri+1):
  n_b = n_bikkuri
  while(not n_b % i):
    total += 1
    n_b /= i
  
print(total % (1e9+7))

Buggy submission (verdict: Runtime Error):
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)
 
n = int(input())
n_bikkuri = factorial(n)
 
total = 1
 
for i in range(2, n_bikkuri+1):
  n_b = n_bikkuri
  while(not n_b % i):
    total += 1
    n_b /= i

Buggy submission (verdict: Runtime Error):
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)
 
n = int(input())
n_bikkuri = factorial(n)
 
total = 1
 
for i in range(2, n+1):
  n_b = n_bikkuri
  while(not n_b % i):
    total += 1
    n_b /= i
 
print(total % (10e9 + 7))

Buggy submission (verdict: Runtime Error):
def factorial(x):
  if x == 1: return 1
  else: return x*factorial(x-1)

n = int(input())
n_bikkuri = factorial(n)

total = 1

for i in range(2, n+1):
  n_b = n_bikkuri
  while(not n_b % i):
    total += 1
    n_b /= i

print(total)
Problem p03836 (python)

Fixed submission:
sx, sy, tx, ty = map(int, input().split())
s = ""
dx, dy = abs(tx - sx), abs(ty - sy)
dxy = dx + dy
for a in range(dx):
  s += "R"
for b in range(dy):
  s += "U"
for c in range(dx):
  s += "L"
for d in range(dy):
  s += "D"
s += "D"
for e in range(dx + 1):
  s += "R"
for f in range(dy + 1):
  s += "U"
s += "L"
s += "U"
for g in range(dx + 1):
  s += "L"
for h in range(dy + 1):
  s += "D"
s += "R"
print(s)

Buggy submission (verdict: Runtime Error):
sx, sy, tx, ty = map(int, input().split())
s = ""
dx, dy = abs(tx - sx), abs(ty - sy)
dxy = dx + dy
for a in range(dx):
  s += "R"
for b in range(dy):
  s += "U"
for c in range(dx):
  s += "L"
for d in range(dy):
  s += "D"
s + = "D"
for e in range(dx + 1):
  s += "R"
for f in range(dy + 1):
  s + = "U"
s += "U"
for g in range(dx + 1):
  s += "L"
for h in range(dy + 1):
  s += "D"
s += "R"
print(s)
Problem p03845 (python)

Fixed submission:
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p = []
x = []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
  
s = sum(t)
for j in range(m):
  print(s - t[p[j]-1] + x[j])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p = []
x = []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
  
s = sum(t)
for j in range(max(n, m)):
  print(s - t[p[j]] + x[j])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p = []
x = []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
  
s = sum(t)
for j in range(m):
  print(int(s - t[p[j]] + x[j]))

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
s = sum(t)
for j in range(m):
  print(int(s - t[p[j]] + x[j]))

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p.append(q)
  x.append(y)
s = sum(t)
for j in range(m):
  print(s - t[p[j]] + x[j])

Buggy submission (verdict: Runtime Error):
n = int(input())
t = list(map(int, input().split()))
m = int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p[i] = q
  x[i] = y
s = sum(t)
for j in range(m):
  print(s - t[p[j]] + x[j])

Buggy submission (verdict: Runtime Error):
n, t, m = int(input()), list(map(int, input().split())), int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p[i] = q
  x[i] = y
s = sum(t)
for j in range(m):
  print(s - t[j] + x[j])

Buggy submission (verdict: Runtime Error):
n, t, m = int(input()), list(map(int, input().split())), int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p[i] = q
  x[i] = y
s = sum(t)
for j in range(m):
  print(s - t[i] + x[i])

Buggy submission (verdict: Runtime Error):
n, t, m = int(input()), list(map(int, input().split())), int(input())
p, x = [], []
for i in range(m):
  q, y = map(int, input().split())
  p[i] = q
  x[i] = y
s = sum(t)
for j in range(m):
  print(sum - t[i] + x[i])
Problem p04012 (python)

Fixed submission:
li = [0]*26
alpha2num = lambda c: ord(c) - ord('A')
w = input().upper()
for i in range(len(w)):
  k = alpha2num(w[i])
  li[k] += 1
for j in li:
  if j % 2:
    print("No")
    break
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
li = [0]*26
alpha2num = lambda c: ord(c) - ord("A")
w = input().upper()
for i in range(len(w)):
  k = alpha2num(w[i])
  li[k] += 1
else:
  for j in li:
    if(not j %= 2):
      print("No")
      break
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
li = [0]*26
alpha2num = lambda c: ord(c) - ord("A") + 1
w = input().upper()
for i in range(len(w)):
  k = alpha2num(w[i])
  li[k] += 1
else:
  for j in li:
    if(not j %= 2):
      print("No")
      break
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
li = [0]*26
alpha2num = lambda c: chr(c+64)
w = input()
for i in range(len(w)):
  k = alpha2num(w[i])
  li[k] += 1
else:
  for j in li:
    if(not j %= 2):
      print("No")
      break
  else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
li = []*26
alpha2num = lambda c: chr(c+26)
w = input()
for i in range(len(w)):
  k = alpha2num(w[i])
  li[k] += 1
else:
  for j in li:
    if(not j %= 2):
      print("No")
      break
  else:
    print("Yes")
Problem p04030 (python)

Fixed submission:
li = list(input())
ans = ""
for i in li:
  if i == "0":
    ans = ans + "0"
  elif i == "1":
    ans = ans + "1"
  elif i == "B":
    ans = ans[:len(ans)-1]
print(ans)

Buggy submission (verdict: Runtime Error):
li = list(str(input()))
for i in range(li):
  if(li[i] == "B" and not i == 0):
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Buggy submission (verdict: Runtime Error):
li = list(str(input()))
for i in len(li):
  if(li[i] == "B" and not i == 0):
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Buggy submission (verdict: Runtime Error):
li = list(map(str, input()))
for i in len(li):
  if(not i == 0 and li[i] == "B"): 
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Buggy submission (verdict: Runtime Error):
li = list(input())
for i in len(li):
  if(not i == 0 and li[i] == "B"): 
    li[i-1] = ""
    li[i] = ""
print("".join(li))

Buggy submission (verdict: Runtime Error):
li = list(input())
for i in range(len(li)):
  if li[i]=="B": li[i-1]==""
else:
  for j in len(li):
    if li[j]=="B": li[j]==""
  else:
    print("".join(li))
Problem p04043 (python)

Fixed submission:
a,b,c = map(int, input().split())
if a==b and b<c: print("YES")
elif b==c and c<a: print("YES")
elif c==a and a<b: print("YES")
else: print("NO")

Buggy submission (verdict: Runtime Error):
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if a=b and b<c: print("YES")
elif b=c and c<a: print("YES")
elif c=a and a<b: print("YES")
else: print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c = map(int, input().split())
if (a=b<c or b=c<a or c=a<b): print("YES")
else: print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c = map(str, input().split())
if (a=b or b=c or c=a):
  if(not a=b=c): print("YES")
  else: print("NO")
else: print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c = input().split()
if (a=b or b=c or c=a and not a=b=c): print("YES")
else: print("NO")
Problem p04044 (python)

Fixed submission:
n,l = map(int, input().split())
Li = []
i = 0
while i<n:
  Li.append("".join(input()))
  i += 1
else:
  Li.sort()
  print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,l = map(int, input().split())
Li = []
for i in range(n):
  li = list(input()).sort()
  wrd = "".join(li)
  Li.append(wrd)
else:
  print("".join(Li.sort()))
Problem p04045 (python)

Fixed submission:
n,k = map(str, input().split())
li = list(map(str, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n = int(n)+1
  Li = list(str(n))
else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = list(map(int, input().split()))
Li = list(n)
while len(set(Li)&set(li)):
  n += 1
  Li = list(n)
else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = list(map(int, input().split()))
Li = list(n)
while set(Li)&set(li):
  n += 1
  Li = list(n)
else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
for i in range(k):
  li.append(int(input()))
else:
  Li = list(n)
  while not len(set(li)&set(Li)) == 0:
    n += 1
    Li = list(n)
  else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
for i in range(k):
  li.append(int(input()))
else:
  Li = list(n)
  while not len(set(li)&set(Li)):
    n += 1
    Li = list(n)
  else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while not len(set(li)&set(Li)):
    n += 1
    Li = list(n)
  else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while not set(li)&set(Li) == set():
    n += 1
    Li = list(n)
  else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while not set(li)&set(Li) == {}:
    n += 1
    Li = list(n)
  else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(n)
  while li&Li:
    n += 1
    Li = list(n)
  else: print("".join(Li))

Buggy submission (verdict: Runtime Error):
n,k = map(int, input().split())
li = []
i = 0
for i<k:
  li.append(int(input()))
  i += 1
else:
  Li = list(str(n))
  while li&Li:
    n += 1
    Li = list(str(n))
  else: print("".join(Li))
Problem p03316 (python)

Fixed submission:
x=input()
c=0
for i in range(len(x)):
  c+=ord(x[i])-ord('0')
x=int(x)
if x%c==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x=input()
c=0
for i in range(len(x)):
  c+=x[i]-'0'
x=int(x)
if x%c==0:
  print("Yes")
else:
  print("No")
Problem p03323 (python)

Fixed submission:
x,y=map(int,input().split())
if x<9 and y<9:
  print("Yay!")
else:
  print(":(")

Buggy submission (verdict: Runtime Error):
x=int(input())
y=int(input())
if x<9 and y<9:
  print("Yay!")
else:
  print(":(")
Problem p03316 (python)

Fixed submission:
if __name__ == "__main__":
    s = str(input())

    ans = 0

    for i in s:
        ans = ans + int(i)

    b = "Yes" if int(s) % ans == 0 else "No"

    print(b)

Buggy submission (verdict: Runtime Error):
s = str(input())

    ans = 0

    for i in s:
        ans = ans + int(i)

    b = True if ans % 2 ==0 else False

    print(b)