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

Fixed submission:
X,A =map(int,input().split())
if X < A:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
A,X =map(int,input().split())
if X < A :
  print(0)
elif:
  print(10)
Problem p03029 (python)

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



a=((P + A * 3) / 2)
print(int(a))

Buggy submission (verdict: Runtime Error):
A =input()
A =int( A )
P =input()
P =int( P )

X = ( A * 3 + P ) // 2 
print( X )

Buggy submission (verdict: Runtime Error):
A = input()
A = int(A)
P = input()
P = int(P)

X = ( A * 3 + P ) // 2 
print ( X )

Buggy submission (verdict: Runtime Error):
A = input()
A =int(A)
P = input()
P =int(P)
X = (A * 3 + P) // 2 
print(X)

Buggy submission (verdict: Runtime Error):
A = input()
A =int(A)
P = input()
P =int(P)

print ( (A * 3 + P) // 2 )

Buggy submission (verdict: Runtime Error):
A = input()
A =int(A)
P = input()
P =int(P)

X = (A * 3 + P) // 2 
print(X)

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

P = input()
P =int(P)

X = (A * 3 + P) // 2 
print(X)

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

P = input()
P =int(P)

X = (A * 3 + P) // 2 
print(X)
Problem p03210 (python)

Fixed submission:
a =input()
a =int(a)

if a == 7 or a == 5 or a == 3:
  print('YES')
else:
  print('NO')

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

if a == 7 or a == 5 or a == 3:
  print(YES)
else:
  print(NO)

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

if a = 7 or a = 5 or a = 3:
  print(YES)
else:
  print(NO)
Problem p02995 (python)

Fixed submission:
# 最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


# 最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

hoge = lcm(c,d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // hoge))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // hoge))

print(b - a + 1 - counter)

Buggy submission (verdict: Runtime Error):
import math

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

hoge = (c * d) // math.gcd(c, d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // hoge))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // hoge))

print(b - a + 1 - counter)

Buggy submission (verdict: Runtime Error):
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

a,b,c,d = input().split(' ')

a = int(a)
b = int(b)
c = int(c)
d = int(d)

saisyo_kobaisu = lcm(c, d)

counter = 0

counter = counter + ((b // c) + (b // d) - (b // saisyo_kobaisu))
counter = counter - (((a - 1) // c) + ((a - 1) // d) - ((a - 1) // saisyo_kobaisu))

print(b - a + 1 - counter)
Problem p02909 (python)

Fixed submission:
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[(wea.index(s) + 1) % 3]))

Buggy submission (verdict: Runtime Error):
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[wea.index(s) + 1 % 3]))

Buggy submission (verdict: Runtime Error):
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format(wea[wea.index(s) + 1 % 3])

Buggy submission (verdict: Runtime Error):
s = input()
 
wea = ["Sunny", "Cloudy", "Rainy"]
 
print("{}".format( wea[(wea.index(s) + 1) % 3)] )
Problem p02909 (python)

Fixed submission:
s=input()
l=('Sunny','Cloudy', 'Rainy','Sunny')
for i in range (len(l)-1):
    if l[i]==s:
        print(l[i+1])

Buggy submission (verdict: Runtime Error):
s=input()
l=(ensoleillé, nuageux, pluvieux)
if s in l:
    for i in len (l):
        if l(i)==s:
            print(l(i+1))
else :
    print ('autre')
Problem p02909 (python)

Fixed submission:
S=input()
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")

Buggy submission (verdict: Runtime Error):
input()
if S == "Sunny":
    print("Cloudy")
elif S == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
Problem p03854 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)

S = input()

def func(i):
    if i >= len(S):
        return True
    if S[i:i+5] == 'dream':
        if func(i + 5): return True
        if S[i+5:i+7] == 'er':
            if func(i + 7): return True
        return False
    if S[i:i+5] == 'erase':
        if func(i + 5): return True
        if S[i+5] == 'r':
            if func(i + 6): return True
        return False

print('YES' if func(0) else 'NO')

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

def func(S):
    if S == '':
        return True
    a, b, c, d = False, False, False, False
    if S[0:5] == 'dream':
        a = func(S[5:])
        if S[5:7] == 'er':
            b =  func(S[7:])
    elif S[0:5] == 'erase':
        c = func(S[5:])
        if S[5] == 'r':
            d = func(S[6:])
    else:
        return False
    return a or b or c or d

print('YES' if func(S) else 'NO')
Problem p02910 (python)

Fixed submission:
import re

s = input()

pattern = re.compile(r'^([^L][^R])*[^L]?$')
is_easy_to_dance = pattern.match(s)

print("Yes") if is_easy_to_dance else print("No")

Buggy submission (verdict: Runtime Error):
words = list(input())

for index, word in enumerate(words):
    isEven = index % 2 == 0
    if (isEven and word == "L") or ((not isEven) and word == "R") :
        continue
    else:
        print("NO")
        exit(-1)

print("YES")
Problem p02911 (python)

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

scores = [k - q] * n

for index in range(q):
    winner = int(input())
    scores[winner - 1] += 1

for participant in range(n):
    print('Yes') if scores[participant] > 0 else print('No')

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

scores = [k - q] * n

for index in range(q):
    winner = int(input())
    scores[winner] += 1

for participant in range(n):
    print('Yes') if scores[participant] > 0 else print('No')
Problem p02909 (python)

Fixed submission:
S = input()
if S == "Sunny":
  print("Cloudy")
elif S == "Cloudy":
  print("Rainy")
elif S == "Rainy":
  print("Sunny")

Buggy submission (verdict: Runtime Error):
weather = ["Sunny","Cloudy","Rainy"]
S = input()
today = weather.index(S)
tomorrow = int(today) + 1
print(weather[tomorrow])
Problem p03109 (python)

Fixed submission:
y, m, d = map(int, input().split("/"))
if y > 2019:
    print("TBD")
elif y == 2019:
    if m > 4:
        print("TBD")
    else:
        print("Heisei")
else:
    print("Heisei")

Buggy submission (verdict: Runtime Error):
import bisect

A, B, Q = map(int, input().split())
S = []
for i in range(A):
    S.append(int(input()))
T = []
for i in range(B):
    T.append(int(input()))
X = []
for i in range(Q):
    X.append(int(input()))

for x in X:
    sxi, txi = bisect.bisect_right(S, x), bisect.bisect_right(T, x)
    print(min(abs(s-t)+min(abs(s-x), abs(t-x))
              for s in S[sxi-1:sxi+1] for t in T[txi-1:txi+1]))

Buggy submission (verdict: Runtime Error):
y, m, d = input().split("/")
if y > 2019:
    print("TBD")
elif y == 2019:
    if m > 5:
        print("TBD")
else:
    print("Heisei")
Problem p03112 (python)

Fixed submission:
import bisect

A, B, Q = map(int, input().split())
INF = 10**18
S = [-INF]
for i in range(A):
    S.append(int(input()))
S.append(INF)
T = [-INF]
for i in range(B):
    T.append(int(input()))
T.append(INF)
X = []
for i in range(Q):
    X.append(int(input()))

for x in X:
    a, b = bisect.bisect_right(S, x), bisect.bisect_right(T, x)
    print(min(abs(s-t) + min(abs(s-x), abs(t-x))
              for s in S[a-1:a+1] for t in T[b-1:b+1]))

Buggy submission (verdict: Runtime Error):
A, B, Q = map(int, input().split())
s = []
for i in range(A):
    s.append(int(input()))
s.sort()
t = []
t.sort()
for i in range(B):
    t.append(int(input()))
x = []
for i in range(Q):
    x.append(int(input()))

for i in range(Q):
    sx, tx, sy, ty = [], [], [], []
    for j in range(A):
        sx.append(abs(s[j] - x[i]))
    for j in range(B):
        tx.append(abs(t[j] - x[i]))
    sxi = sx.index(min(sx))
    txi = tx.index(min(tx))
    for j in range(B):
        ty.append(abs(t[j] - s[sxi]))
    for j in range(A):
        sy.append(abs(s[j] - t[sxi]))
    a = min(sx) + min(ty)
    b = min(tx) + min(sy)
    if a < b:
        print(a)
    else:
        print(b)

Buggy submission (verdict: Runtime Error):
A, B, Q = map(int, input().split())
s = []
for i in range(A):
    s.append(int(input()))
s.sort()
t = []
t.sort()
for i in range(B):
    t.append(int(input()))
x = []
for i in range(Q):
    x.append(int(input()))

for i in range(Q):
    sx, tx, sy, ty = [], [], [], []
    for j in range(A):
        sx.append(abs(s[j] - x[i]))
    for j in range(B):
        tx.append(abs(t[j] - x[i]))
    sxi = sx.index(min(sx))
    txi = tx.index(min(tx))
    for j in range(B):
        ty.append(abs(t[j] - s[sxi]))
    for j in range(A):
        sy.append(abs(s[j] - t[sxi]))
    a = min(sx) + min(ty)
    b = min(tx) + min(sy)
    if a < b:
        print("a"+str(a))
    else:
        print("b"+str(b))
Problem p03125 (python)

Fixed submission:
a, b = map(int, input().split())
c = a+b if b % a == 0 else b-a
print(c)

Buggy submission (verdict: Runtime Error):
a,b=input().split()
c=a+b if b%a=0 b-a
print(c)
Problem p02952 (python)

Fixed submission:
N = int(input())
count = 0
N += 1
for i in range(1, N):
    if len(str(i)) % 2 != 0:
        count += 1
print(count)

Buggy submission (verdict: Runtime Error):
count = 0
N +=1
for i in range(1, int(N)):
    if len(str(i)) % 2 != 0:
        count += 1
print(count)
Problem p03043 (python)

Fixed submission:
N, K = map(int, input().split())
 
calc = 0
for i in range(1, N+1):
  tmp = i
  cnt = 0
  while tmp <= K - 1:
    tmp*=2
    cnt+=1
  calc += (1/N) * (1/(2**cnt))

print(calc)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
calc = 0
for i in range(1, N+1):
  tmp = i
  cnt = 0
  while tmp <= K - 1:
    tmp*=2
    cnt+=1
  calc += (1/N) * (1/(2*cnt))

print(calc)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
 
calc = 0
for i in range(1, N+1):
  tmp = i
  cnt = 0
  while tmp <= K-1
    tmp*=2
    cnt+=1
  calc += (1/N) * (1/(2*cnt))

print(calc)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input())
 
calc = 0
for i in range(1, N+1):
  tmp = i
  cnt = 0
  while tmp <= K-1
    tmp*=2
    cnt+=1
  calc += (1/N) * (1/(2**cnt))

print(calc)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input())
 
calc = 0
for i in range(1, N+1):
  tmp = i
  cnt = 0
  while tmp <= K-1
    tmp*=2
    cnt+=1
  calc += (1/N) * (1/(2*cnt))

print(calc)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input())
 
calc = []
for i in range(1, N+1):
  tmp = i
  cnt = 0
  while tmp <= K-1
    tmp*=2
    cnt+=1
  calc.append((1/N) * (1/(2*cnt)))

print(sum(calc))

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

calc = []
for i in range(1, N+1):
  dice = i
  result = 0
  count = 0
  while result <= K-1
    dice+=dice*2
    count+=1
  calc.append(1/N*(1/2)*count)

print(sum(calc))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input())
 
for i in range(N):
  dice = i+1
  result = 0
  calc = []
  count = 0
  while result <= K-1
    dice+=dice*2
    count+=1
  calc.append(1/N*(1/2)*count)

print(sum(calc))

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

for i in range(N):
  dice = i+1
  result = 0
  calc = []
  count = 0
  while result <= K
    dice+=dice*2
    count+=1
  calc.append(1/N*(1/2)*count)

print(sum(calc))
Problem p03059 (python)

Fixed submission:
a, b, t = input().split() 
print(int(t) // int(a) * int(b))

Buggy submission (verdict: Runtime Error):
a, b, t = input().split() 
print(t / a * b)
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=int(input())
import math
print(int(math.ceil(a+b)))
Problem p03545 (python)

Fixed submission:
abcd=[int(i) for i in input()]
a=abcd[0]
b=abcd[1]
c=abcd[2]
d=abcd[3]

if a+b+c+d == 7:
  print('{}+{}+{}+{}=7'.format(a,b,c,d))
elif a+b+c-d == 7:
  print('{}+{}+{}-{}=7'.format(a,b,c,d))
elif a+b-c+d == 7:
  print('{}+{}-{}+{}=7'.format(a,b,c,d))
elif a-b+c+d == 7:
  print('{}-{}+{}+{}=7'.format(a,b,c,d))
elif a+b-c-d == 7:
  print('{}+{}-{}-{}=7'.format(a,b,c,d))
elif a-b-c+d == 7:
  print('{}-{}-{}+{}=7'.format(a,b,c,d))
elif a-b+c-d == 7:
  print('{}-{}+{}-{}=7'.format(a,b,c,d))
elif a-b-c-d == 7:
  print('{}-{}-{}-{}=7'.format(a,b,c,d))
else:
  pass

Buggy submission (verdict: Runtime Error):
abcd=[int(i) for i in input()]
sums=sum(abcd)
dif=sums-7
op =['+', '+', '+']
if sums==7:
  pass
elif sums == 11:
  indx = abcd.index(2)
  op[indx-1] = '-'
elif 18 >= dif > 11:
  indx = abcd.index(dif/2)
  op[indx-1] = '-'
elif dif > 18:
  indxs = [i for i, x in enumerate(abcd) if x == dif/4]
  for i, x in enumerate(abcd):
    if x == dif/4:
	    op[i-1] = '-'
  
print('{}{}{}{}{}{}{}=7'.format(abcd[0], op[0], abcd[1], op[1], abcd[2], op[2], abcd[3]))
Problem p02910 (python)

Fixed submission:
x = list(input())
i = 0
edetector = True
odetector = True
while i < len(x):
    if  i % 2 == 0:
        if not x[i] in ["R", "U", "D"]:
            edetector = False
    else:
        if not x[i] in ["L", "U", "D"]:
            odetector = False
    i += 1

if edetector and odetector:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x = list(input())
i = 0
while i < len(x) - 2:
    if  i % 2 == 0:
        if x[i] in ["L", "U", "D"]:
            edetector = True
        else:
            edetector = False
    else:
        if x[i] in ["R", "U", "D"]:
            odetector = True
        else:
            odetector = False
    i += 1

if edetector and odetector:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x = list(input())
i = 0
while i < len(x) - 1:
    if  i % 2 == 0:
        if x[i] in ["L", "U", "D"]:
            edetector = True 
        else:
            edetector = False
    else:
        if x[i] in ["R", "U", "D"]:
            odetector = True 
        else:
            odetector = False
    i += 1
if edetector and odetector:
    print("Yes")
else:
    print("No")
Problem p02911 (python)

Fixed submission:
x = input().split()
plist = [int(x[1]) for i in range(int(x[0]))]
y = []
l = 0
while l < int(x[2]):
    ans = input()
    y.append(int(ans))
    l += 1

for i in y:
    plist[i-1] += 1

for p in plist:
    if p - int(x[2]) > 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
x = input().split()
pointdict = {}
y = []
for i in x[0]:
    pointdict[i] = x[1]

for i in x[2]:
    ans = input()
    y.append(ans)

for i in y:
    for e in x[0]:
        if e != i:
            pointdict[e] -= 1

for p in pointdict:
    if pointdict[p] is not 0:
        print("Yes")
    else:
        print("No")
Problem p02993 (python)

Fixed submission:
N = input()
pre = 10
count = 0
for x in N:
    if x == pre:
        print("Bad")
        count = 1
        break
    pre = x
if count == 0:
    print("Good")

Buggy submission (verdict: Runtime Error):
import math
input = list(map(int,input().split()))
A = input[0]
B = input[1]
C = input[2]
D = input[3]

betweenAandB = B-A+1

cA = math.ceil(A/C)
cB = int(B/C)
cDiv = cB - cA + 1

dA = math.ceil(A/D)
dB = int(B/D)
dDiv = dB - dA + 1

GCD = math.gcd(C,D)
LCM = C*D/GCD

lcmA = math.ceil(A/LCM)
lcmB = int(B/LCM)
lcmDiv = max(lcmA, lcmB) - min(lcmA, lcmB) + 1

ans = betweenAandB - cDiv - dDiv + lcmDiv
print(ans)
Problem p02995 (python)

Fixed submission:
import math
A,B,C,D = map(int, input().split())

def gcd(x, y):
    while y != 0:
        (x, y) = (y, x % y)
    return x

betweenAandB = B-A+1

cA = (A-1)//C
cB = B//C
cDiv = cB - cA

dA = (A-1)//D
dB = B//D
dDiv = dB - dA

GCD = gcd(C,D)
LCM = C*D//GCD

lcmA = (A-1)//LCM
lcmB = B//LCM
lcmDiv = lcmB - lcmA

ans = betweenAandB - cDiv - dDiv + lcmDiv
print(ans)

Buggy submission (verdict: Runtime Error):
import math
input = list(map(int,input().split()))
A = input[0]
B = input[1]
C = input[2]
D = input[3]

betweenAandB = B-A+1

cA = math.ceil(A/C)
cB = int(B/C)
cDiv = cB - cA + 1

dA = math.ceil(A/D)
dB = int(B/D)
dDiv = dB - dA + 1

GCD = math.gcd(C,D)
LCM = C*D/GCD

lcmA = math.ceil(A/LCM)
lcmB = int(B/LCM)
lcmDiv = max(lcmA, lcmB) - min(lcmA, lcmB) + 1

ans = betweenAandB - cDiv - dDiv + lcmDiv
print(ans)

Buggy submission (verdict: Runtime Error):
import math
input = list(map(int,input().split()))
A = input[0]
B = input[1]
C = input[2]
D = input[3]

betweenAandB = B-A+1

cA = math.ceil(A/C)
cB = int(B/C)
cDiv = cB - cA + 1

dA = math.ceil(A/D)
dB = int(B/D)
dDiv = dB - dA + 1

GCD = math.gcd(C,D)
LCM = C*D/GCD

lcmA = math.ceil(A/LCM)
lcmB = int(B/LCM)
lcmDiv = max(lcmA, lcmB) - min(lcmA, lcmB) + 1

ans = betweenAandB - cDiv - dDiv + lcmDiv
print(betweenAandB)
print(cDiv)
print(dDiv)
print(lcmDiv)
print(ans)
Problem p02909 (python)

Fixed submission:
whether = input()
if whether == 'Sunny':
    print('Cloudy')
elif whether == 'Cloudy':
    print('Rainy')
elif whether == 'Rainy':
    print('Sunny')

Buggy submission (verdict: Runtime Error):
whether = input()
if whether == Sunny:
  print('Cloudy')
elif whether == Cloudy:
  print('Rainy')
elif:
  print('Sunny')

Buggy submission (verdict: Runtime Error):
whether = input()
if whether == Sunny:
  print('Cloudy')
elif whether == Cloudy:
  print('Rainy')
elif:
  print(Sunny)
Problem p02909 (python)

Fixed submission:
S = input()
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Buggy submission (verdict: Runtime Error):
S = input()
if S == 'Sunny':
  print('Cloudy')
else if S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Buggy submission (verdict: Runtime Error):
S = input()
if S == "Sunny":
  print("Cloudy")
else if S == "Cloudy":
  print("Rainy")
else:
  print("Sunny")

Buggy submission (verdict: Runtime Error):
S = input()
if S == "Sunny":
  print("Cloudy")
else if S == "Cloudy":
  print("Rainy")
else if S == "Rainy":
  print("Sunny")
Problem p02910 (python)

Fixed submission:
S = list(input())

Sodd = S[::2]
Seven = S[1::2]

if "L" in Sodd:
  print("No")
elif "R" in Seven:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
S = list(map(int, input().split()))
Sodd = S.Slice[::2]
Seven = S.Slice[1::2]
if "L" in Sodd:
  print("No")
elif "R" in Seven:
  print("No")
else:
  Print("Yes")
Problem p02910 (python)

Fixed submission:
def easy_step(s) :
    s_odd = s[::2]
    s_even = s[1::2]
    if ("L" in s_odd) or ("R" in s_even) :
        print("No")
    else :
        print("Yes")
s = list(input())
easy_step(s)

Buggy submission (verdict: Runtime Error):
s = list(input())
def easy_step(s) :
    s_even = s[::2]
    s_odd = [1::2]
    if ("L" in s_odd) or ("R" in s_even) :
        print("No")
    else :
        print("Yes")
easy_step(s)

Buggy submission (verdict: Runtime Error):
s = list(input())
def easy_step(s) :
    s_odd = s[::2]
    s_even = [1::2]
    if ("L" in s_odd) or ("R" in s_even) :
        print("No")
    else :
        print("Yes")
easy_step(s)
Problem p02909 (python)

Fixed submission:
#一日ごとに晴れ(Sunny)、くもり(Cloudy)、雨(Rainy)

tennki = input()
if tennki=="Sunny":print("Cloudy")
elif tennki=="Cloudy":print("Rainy")
else:print("Sunny")

Buggy submission (verdict: Runtime Error):
#Sunny
#Cloudy
#Rainy

tennki = input()
if tennki="Sunny":print("Cloudy")
elif tennki="Cloudy":print("Rainy")
else print("Sunny")
Problem p04043 (python)

Fixed submission:
# coding: utf-8
# Your code here!

input_list = input().split()
sort_list = (int(input_list[0]),int(input_list[1]),int(input_list[2]))

tuple_a = (5,5,7)
tuple_b = (5,7,5)
tuple_c = (7,5,5)

if sort_list==tuple_a or sort_list==tuple_b or sort_list==tuple_c:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
input_a = input().split()
kazu = int(input_a[0]) + 1
suuji_kosuu = int(input_a[1])

input_b = input().split()

for i in range(kazu,10000):
    t = 0
    for j in range(suuji_kosuu):
        if input_b[j] in str(i):
            break
        else:
            t = t+1
            continue
    if t == suuji_kosuu:
        print(i)
        break
Problem p02910 (python)

Fixed submission:
S = input()
ans = "Yes"

for i in range(len(S)):
	if i%2 == 0:
		if S[i] == 'L':
			ans = "No"
			break
	
	if i%2 == 1:
		if S[i] == 'R':
			ans = "No"
			break
	
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
ans = "Yes"

for i in range(len(S)):
	if i%2 == 0:
		if !(S[i] in ('R', 'U', 'D')):
			ans = "No"
			break
	
	if i%2 == 1:
		if !(S[i] in ('L', 'U', 'D')):
			ans = "No"
			break
	
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
ans = "Yes"

for i in range(len(S)):
	if S[i]%2 == 0:
		if !(S[i] in ('R', 'U', 'D')):
			ans = "No"
			break
	
	if S[i]%2 == 1:
		if !(S[i] in ('L', 'U', 'D')):
			ans = "No"
			break
	
print(ans)
Problem p02921 (python)

Fixed submission:
S = input()
T = input()
count = 0
for n in range(3):
  if S[n] == T[n]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
count = 0
for n in range(3):
  if S[n] = T[n]:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
count = 0
for n inrange(3):
  if S[n] = T[n]:
    count += 1
print(count)
Problem p02923 (python)

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

max = 0
count = 0
for n in range(N-1):
  if H[n] >= H[n+1]:
    count += 1
    if count > max:
      max = count
  else:
    count = 0
print(max)

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

max = 0
count = 0
for n in range(N-1):
  if H[n] >= H[n+1]:
    count += 1
  else:
    if count > max:
      max = count
    count = 0
print(max)

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

max = 0
count = 0
for n in range(N-1)
  if H[n] >= H[n+1]:
    count += 1
  else:
    if count > max:
      max = count
    count = 0
print(max)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = map(int, input().solit())

max = 0
count = 0
for n in range(N-1)
  if H[n] >= H[n+1]:
    count += 1
  else:
    if count > max:
      max = count
    count = 0
print(max)