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

Fixed submission:
N, D = list(map(int,input().split()))
X = []
for i in range(N):
    X.append(list(map(int,input().split())))
#print(X)
count = 0
for i in range(0,N,1):
    for j in range(i+1,N,1):
        wa = 0
        for k in range(D):
            wa += (X[i][k] - X[j][k])**2
        if wa**0.5 == int(wa**0.5):
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
, D = list(map(int,input().split()))
X = []
for i in range(N):
    X.append(list(map(int,input().split())))
#print(X)
count = 0
for i in range(0,N,1):
    for j in range(i+1,N,1):
        wa = 0
        for k in range(D):
            wa += (X[i][k] - X[j][k])**2
        if wa**0.5 == int(wa**0.5):
            count += 1
print(count)
Problem p03457 (python)

Fixed submission:
n = int(input())
a = [input().split() for l in range(n)]
b = 0
t = [0]
x = [0]
y = [0]
for i in range(n):
    t.append(a[i][0])
    x.append(a[i][1])
    y.append(a[i][2])

for k in range(n):
    o = int(t[k+1])-int(t[k])
    p = int(x[k+1])-int(x[k])
    q = int(y[k+1])-int(y[k])
    if (o >= p+q) and ((o - (p+q))%2 == 0):
        b += 1
    else:
        b = b

if b == n:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [input().split() for l in range(n)]
b = 0
t = [0]
x = [0]
y = [0]
for i in range(n):
    t.append(a[i][0])
    x.append(a[i][1])
    y.append(a[i][2])

for k in range(n+1):
    o = int(t[k+1])-int(t[k])
    p = int(x[k+1])-int(x[k])
    q = int(y[k+1])-int(y[k])
    if (o >= p+q) and ((o - (p+q))%2 == 0):
        b += 1
    else:
        b = b

if b == n:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [input().split() for l in range(n)]
b = 0
t = [0]
x = [0]
y = [0]
for i in range(n):
    t.append(a[i][0])
    x.append(a[i][1])
    y.append(a[i][2])


for p in range(1,n+1):
    o = int(t[i])-int(t[i-1])
    p = int(x[i])-int(x[i-1])
    q = int(y[i])-int(y[i-1])
    if o >= p+q and (o - (p+q))%2 == 0:
        b += 1

if b == n:
    print('Yes')
else:

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    t,x,y = map(int,input().split())
    if (t[i]-(x[i-1]+y[i-1]))%2 == 0 or t[i] == (x[i-1] + y[i-1]):
        print('Yes')
    elif (t[i]-(x[i-1]+y[i-1]))%2 == 1:
        print('No')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    t,x,y = map(int,input().split())
    if (t[i]-(x[i-1]+y[i-1]))%2 == 0 or t[i] == x[i-1] + y[i-1]:
        print('Yes')
    elif (t[i]-(x[i-1]+y[i-1]))%2 == 1:
        print('No')
    else:
        print('No')
Problem p03470 (python)

Fixed submission:
N = int(input())
d = [int(input()) for i in range(N)]
a = 0
b = 0
e = sorted(d)

while b == 0:
    for l in range(N):
        if e[l-1] < e[l]:
            a += 1
        else:
            b += 1

print(a+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
d = [int(input()) for i in range(N)]
a = 0
b = 0
e = sorted(d)

while b == 0:
    for l in range(N):
        if e[l] < e[l+1]:
            a += 1
        else:
            b += 1

print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())
d = [int(input()) for i in range(N)]
a = 0
b = 0
while b == 0:
for l in range(N):
    if d[l]<d[l+1]:
        a += 1
    else:
        b += 1

print(a)
Problem p03606 (python)

Fixed submission:
n = int(input())
s = 0
a = [input().split() for i in range(n)]

l = [0]
r = [0]
for m in range(n):
    l.append(a[m][0])
    r.append(a[m][1])

for p in range(1,n+1):
    s += int(r[p])-int(l[p])+1

print(s)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = 0

for i in range(n):
    a = list(input().split())
print(a)
l = [0]
r = [0]
for m in range(n):
    l.append(a[m])
    r.append(a[m+1])

print(l)
print(r)
for p in range(1,n+1):
    s += int(r[p])-int(l[p])+1

print(s)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = 0

for i in range(n):
    a = list(input().split())
"""
a = [input().split() for i in range(n)]
"""
print(a)
l = [0]
r = [0]
for m in range(n):
    l.append(a[m])
    r.append(a[m+1])

print(l)
print(r)
for p in range(1,n+1):
    s += int(r[p])-int(l[p])+1

print(s)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = 0
for i in range(n):
    a = list(input().split())

l = [0]
r = [0]
for m in range(n):
    l.append(a[m][0])
    r.append(a[m][1])

for p in range(1,n+1):
    s += int(r[p])-int(l[p])+1

print(s)
Problem p03636 (python)

Fixed submission:
s = input()
l = list(s)
a = len(l)-2
print(l[0],end='')
print(a,end='')
print(l[len(l)-1])

Buggy submission (verdict: Runtime Error):
s = input()
l = list(s)
a = len(l)-2
print(l[0],end='')
print(a,end='')
print(l[len(l)-1]
Problem p02641 (python)

Fixed submission:
x, n = map(int, input().split())
p = list(map(int, input().split()))
l = list(range(1, 100))

if n ==0:
    print(x)
else:
    for j in range(51):
        ll = []
        if not x-j in p:
            ll.append(x-j)
        if len(ll) != 0:
            print(min(ll))
            break
        if not x+j in p:
            ll.append(x+j)
        if len(ll) != 0:
            print(min(ll))
            break

Buggy submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = list(map(int, input().split()))
l = list(range(1, 100))
ll = []
if n ==0:
    print(x)
else:
    for i in p:
        l.remove(i)
    for j in range(50):
        if x-j in l:
            ll.append(x-j)
        if len(ll) != 0:
            print(min(ll))
            break
        if x+j in l:
            ll.append(x+j)
        if len(ll) != 0:
            print(min(ll))
            break

Buggy submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = list(map(int, input().split()))
l = list(range(1, 100))
ll = []
if n ==0:
    print(x)
else:
    for i in p:
        l.remove(i)
    for j in range(100):
        if x-j in l:
            ll.append(x-j)
        if x+j in l:
            ll.append(x+j)
        if len(ll) != 0:
            print(min(ll))
            break
Problem p02664 (python)

Fixed submission:
t = input()
if t == 'P':
    print('P')
elif t == 'D' or t == '?':
    print('D')
else:
    t = list(t)
    if t[0] == '?':
        if t[1] == 'D' or t[1] == '?':
                    t[0] = 'P'
        else:
            t[0] = 'D'

    for i in range(1, len(t)-1):
        if t[i] == '?':
            if t[i-1] == 'P':
                t[i] = 'D'
            else:
                if t[i+1] == 'D' or t[i+1] == '?':
                    t[i] = 'P'
                else:
                    t[i] = 'D'
    if t[-1] == '?':
        t[-1] = 'D' 
    print("".join(t))

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

if t[0] == '?':
    if t[1] == 'D' or t[1] == '?':
                t[0] = 'P'
    else:
        t[0] = 'D'

for i in range(1, len(t)-1):
    if t[i] == '?':
        if t[i-1] == 'P':
            t[i] = 'D'
        else:
            if t[i+1] == 'D' or t[i+1] == '?':
                t[i] = 'P'
            else:
                t[i] = 'D'

if t[-1] == '?':
    t[-1] = 'D' 

print("".join(t))

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

if t[0] == '?':
    if t[i+1] == 'D' or t[i+1] == '?':
                t[i] = 'P'
    else:
        t[-1] = 'D'

for i in range(1, len(t)-1):
    if t[i] == '?':
        if t[i-1] == 'P':
            t[i] = 'D'
        else:
            if t[i+1] == 'D' or t[i+1] == '?':
                t[i] = 'P'
            else:
                t[i] = 'D'

if t[-1] == '?':
    t[-1] = 'D' 

print("".join(t))
Problem p02713 (python)

Fixed submission:
k = int(input())
import math
from functools import reduce

l = []
def gcd(*numbers):
    return reduce(math.gcd, numbers)
def gcd_list(numbers):
    return reduce(math.gcd, numbers)

for i in range(1, k+1):
    for j in range(1, k+1):
        for m in range(1, k+1):
            n = gcd(i, j, m)
            l.append(n)
print(sum(l))

Buggy submission (verdict: Runtime Error):
form math import gcd
num = (int)(input())
total = 0
 
for i in range(1, num + 1):
  for j in range(1, num + 1):
    sub = gcd(i, j)
    for k in range(1, num + 1):
      total += gcd(sub, k)
print(total)

Buggy submission (verdict: Runtime Error):
from math import gcd
num = (int)(input())
total = 0
 
for i in range(1, num + 1):
  for j in range(1, num + 1):
    sub = math.gcd(i, j)
    for k in range(1, num + 1):
      total += math.gcd(sub, k)
print(total)
Problem p02718 (python)

Fixed submission:
n,m=map(int,input().split())
b=list(map(int,input().split()))
s=sum(b)
a=[i for i in b if i>=s/(4*m)]
print("Yes" if len(a)>=m else "No")

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

for i in A:
    if i > sum(A)/(4*M):
        count += 1
    else:
        continue

if count > M:
    print('Yes')
else:
    print('No')
Problem p02760 (python)

Fixed submission:
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
N=int(input())
L=[int(input()) for i in range(N)]
if a in L and b in L and c in L:
  print('Yes')
elif d in L and e in L and  f in L:
  print('Yes')
elif g in L and h in L and  i in L:
  print('Yes')
elif a in L and d in L and  g in L:
  print('Yes')
elif b in L and e in L and  h in L:
  print('Yes')
elif c in L and f in L and  i in L:
  print('Yes')
elif a in L and e in L and  i in L:
  print('Yes')
elif c in L and e in L and  g in L:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
B = []
for _ in range(n):
    B.append(input())

for b in B:
    for x in range(3):
        for y in range(3) :
            if a[x][y] == b:
                a[x][y] = 0

if A[0][0] * A[1][0] * A[2][0] == 0 or A[0][1] * A[1][1] * A[2][1] == 0 or A[0][2] * A[1][2] * A[2][2] == 0 or A[0][0] * A[0][1] * A[0][2] == 0 or A[1][0] * A[1][1] * A[1][2] == 0 or A[2][0] * A[2][1] * A[2][2] == 0 or A[0][0] * A[1][1] * A[2][2] == 0 or A[0][2] * A[1][1] * A[2][0] == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
[a11, a12, a13],[a21, a22, a23],[a31, a32, a33] = [input().split() for l in range(3)]

if : a == [a11, a12, a13]
    print(Yes)
elif :is [a11, a22, a33]
    print(Yes)
elif :is [a11, a21, a31]
    print(Yes)
elif :is [a12, a22, a32]
    print(Yes)
elif :is [a13, a23, a33]
    print(Yes)
elif :is [a13, a22, a31]
    print(Yes)
elif :is [a21, a22, a23]
    print(Yes)
elif :is [a31, a32, a33]
    print(Yes)
else:
    print(No)
Problem p02783 (python)

Fixed submission:
h, a = map(int, input().split())
if h % a == 0:
    print(h//a)
else:
    print(h//a + 1)

Buggy submission (verdict: Runtime Error):
h, a = map(int, input().split)
if h % a == 0:
    print(h//a)
else:
    print(h//a + 1)
Problem p02887 (python)

Fixed submission:
n = int(input())
s = input()
cnt = 1
for i in range(1, n):
    if s[i] != s[i-1]:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
 n = int(input())
 s = input()
cnt = 1
 for i in range(1, n):
     if s[i] != s[i-1]:
         cnt += 1
print(cnt)
Problem p02898 (python)

Fixed submission:
n, k = map(int, input().split())
H = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if H[i] >= k:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
H = list(map(int, input().split()))
cnt = 0
for i in n:
    if H[i] >= k:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
H = list(map(int, input().split()))
cnt = 0
for i in n:
    if H[i] >= k:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
H = list(map(int, input().split()))
cnt = 0
for i in n:
    if H[i] >= k
    cnt += 1
print(cnt)
Problem p02922 (python)

Fixed submission:
a, b = map(int, input().split())
kuchi =  1
cnt = 0
if kuchi <= b:
    for i in range(1, 20):
        if kuchi >= b:
                break
        else:
            for j in range(1, a ** i):
                if kuchi >= b:
                    break
                else:
                    if j < a ** i:
                        cnt += 1
                        kuchi = kuchi - 1 + a
                    else:
                        kuchi = kuchi * a
                        cnt += kuchi / a 
print(cnt)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
kuchi = 1
cnt = 0
if kuchi >= b:
    break
else:
    for i in range(1, 20):
        if kuchi >= b:
                break
        else:
            for j in range(1, a ** i):
                if kuchi >= b:
                    break
                else:
                    if j < a ** i:
                        cnt += 1
                        kuchi = kuchi - 1 + a
                    else:
                        kuchi = kuchi * a
                        cnt += kuchi / a 
print(cnt)
Problem p02947 (python)

Fixed submission:
n = int(input())
cnt = 0
A = []
for _ in range(n):
    t = sorted(input())
    t = "".join(t)
    A.append(t)

import collections
C = collections.Counter(A)
lC = list(C.values())
for i in lC:
    cnt += i * (i-1) // 2
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
cnt = 0
A = []
for _ in range(n):
    A.append(sorted(input())) 
for i in range(n-1):
    for j in range(i+1, n):
        if s == t:
            cnt += 1
print(cnt)
Problem p02993 (python)

Fixed submission:
s = str(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
s = str(int(input()))
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
s = int(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')
Problem p03000 (python)

Fixed submission:
n, x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 1
d = 0
for i in range(n):
    d += l[i]
    if d > x:
        break
    cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 1
d = 0
for i in range(n):
    d += l[i]
    if d = x:
        cnt += 1
        break
    elif d > x:
        break

print(cnt)
Problem p03035 (python)

Fixed submission:
a, b = map(int, input().split())
if a >= 13:
    print(b)
elif 13 > a > 5:
    print(b // 2)
elif 5 >= a:
    print(0)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a >= 13:
    print(b)
elif 12 => a >= 6:
    print(b / 2)
elif: 5 >= a:
    print(0)
Problem p03106 (python)

Fixed submission:
a, b, k = list(map(int, input().split()))
la = []
lb = []
for i in range(1, a+1):
    if a % i == 0:
        la.append(i)
        sa = set(la)
        lsa = list(sa)
        lsas = sorted(lsa)
        for j in lsas:
            if b % j == 0:
                lb.append(j)
s = set(lb)
lsb = list(s)
lsbs = sorted(lsb)
print(lsbs[len(lsbs)-k])

Buggy submission (verdict: Runtime Error):
a, b, k = list(map(int, input().split()))
la = []
lb = []
for i in range(1, a+1):
    if a % i == 0:
        la.append(i)
        lsas = sorted(set(la), key=la.index)
        for j in lsas:
            if b % j == 0:
                lb.append(j)

lsbs = sorted(set(lb), key=lb.index))
print(lsbs[len(lsbs)-k])
Problem p02658 (python)

Fixed submission:
def main ():
	N = int(input())
	A = list(map(int,input(). split ()))
    
	if 0 in A:
		print(0)
		return
      
	prod = 1
	for a in A:
		prod *= a
		if prod > 1000000000000000000:
			print(-1)
			return
          
	print(prod)
main ()

Buggy submission (verdict: Runtime Error):
def main ():
N = int(input())
A = list(map(int,input(). split ()))
if 0 in A:
	print(0)
	return
prod = 1
for a in A:
	prod *= a
if prod > 1000000000000000000:
	print(-1)
	return
print(prod)
main ()

Buggy submission (verdict: Runtime Error):
def main ():
N = int(input())
A = list(map(int,input(). split ()))
if 0 in A:
print(0)
return
prod = 1
for a in A:
prod *= a
if prod > 1000000000000000000:
print(-1)
return
print(prod)
main ()
Problem p02639 (python)

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



for i in range(len(a)):
  if 0==a[i]:
    print(i+1)

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

for i in len(a):
  if 0==a[i]:
    print(i)
    break
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input(). split ())
print(a*b)

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

print(a*b)
Problem p02658 (python)

Fixed submission:
def main():

	n=input()
	a=list(map(int,input().split()))
	
	
	if 0 in a:
		print(0)
		return

	d=1
    
	

	for b in a:
		d=d*b
		if d>10**18:
			print("-1")
			return
	print(d)

main()

Buggy submission (verdict: Runtime Error):
def main():

n=input()
a=map(int,input().split)
d=1

if 0 in a:
  print(0)
  return

for b in a:
  d=d*b
  
  if d>10**18:
    print("-1")
    return
print(d)

def main():

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

d=1

for b in a:
  d=b*d
  if d>10**18:
     print("-1")
      break
    
      
      
      
if d>10**18:
  print("-1")
else:
  print(d)

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

d=1

for b in a:
  d=b*d
  if d=>10**18:
    break 
    
      
      
      
if d=>10**18:
  print("-1")
else:
  print(d)

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

d=1

for b in a:
  
  	d=d*b
    if d>10**18:
      break
if d>10**18:
  print("-1")
else:
  print(d)

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

d=1

for b in a:
  
  d=d*b
if d==10**18:
  print("-1")
  continue
  print(d)
Problem p02675 (python)

Fixed submission:
n=input()
m=int(n[-1])
 
 
 

 
if (m)==3:
    print("bon")
elif m==6 or m==8 or m==0 or m==1:
    print("pon")
    
else:
    print("hon")

Buggy submission (verdict: Runtime Error):
n=input()
m=int(n)



print(m)

if (m[-1]==3:
    print(bon)
elif (m[-1])==6 or (m[-1])==8 or (m[-1])==0:
    print(pon)
    
else:
    print(hon)
Problem p02694 (python)

Fixed submission:
X=int(input())
total,Y=100,0
while X>total:
  total=total*101//100
  Y=Y+1
print(Y)

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

i=0

while(x=>100((1+0.01)**i){
  i=i+1
}


print(i)

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

i=0

while(x>=100((1+0.01)**i){
  i=i+1
}


print(i)

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

i=0

while(x=<100((1+0.01)**i){
  i=i+1
}


print(i)
Problem p02886 (python)

Fixed submission:
n=int(input())
d=list(map(int,input().split()))
sam=0

for i in range(n):
  for j in range(i+1,n): 
    sam=sam+(d[i]*d[j]) 
    

print(sam)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(map(int,input().split()))
sam=0

for i in range(n):
  for j in range(n-i):
    sam=sam+(d[i]*d[j+1])

print(sam)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(map(int,input.split()))
sam=0

for i in range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[J+1])

print(sam)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(map(int,input.split()))
sam=0

for i in range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[j])

print(sam)

Buggy submission (verdict: Runtime Error):
n=int(input())
d=list(map(int,input.split()))
sam=0

for i in  range(n):
  for j in range(n-1):
    sam=sam+(d[i]*d[j])

print(sam)
Problem p02696 (python)

Fixed submission:
A,B,N=map(int, input().split())
if N>=B-1:
    print(int(A*(B-1)/B)-A*int((B-1)/B))
else:
    print(int(A*N/B)-A*int(N/B))

Buggy submission (verdict: Runtime Error):
A,B,N=map(int, input().split())
ans=[]
for i in range(1,N+1,B//A):
    ans.append(int(A*i/B)-A*int(i/B))
print(max(ans))
Problem p02713 (python)

Fixed submission:
import math
K=int(input())
c = 0
for i in range(1,K+1):
  for j in range(1,K+1):
    if math.gcd(i,j) == 1:
      c += K
    else:
      for k in range(1,K+1):
        if i == j == k:
          c += i
        elif i == j:
          c += math.gcd(i,k)
        elif i == k:
          c += math.gcd(i,j)
        elif j == k:
          c += math.gcd(i,k)
        else:
          c += math.gcd(math.gcd(i, j), k)
print(c)

Buggy submission (verdict: Runtime Error):
import math
K=int(input())
c = 0
for i in range(1,K+1):
  for j in range(1,K+1):
    for k in range(1,K+1):
      c += math.gcd(i, j, k)
print(c)
Problem p02720 (python)

Fixed submission:
from collections import deque
K=int(input())
Q=deque(list(range(1,10)))
for _ in range(K):
  x=Q.popleft()
  if x%10 != 0:
    Q.append(10*x+x%10-1)
  Q.append(10*x+x%10)
  if x%10 != 9:
    Q.append(10*x+x%10+1)
print(x)

Buggy submission (verdict: Runtime Error):
K=int(input())
n=0
c=0
while 1:
  j=True
    if len(n_str) > 1 and abs(int(n_str[0]) - int(n_str[1])) > 1:
    n = (int(str(int(n_str[0])+1)+str(int(n_str[0]))))*(10**(len(n_str)-2))
  else:
    n+=1
  n_str=str(n)
  for i in range(len(n_str)-1):
    if abs(int(n_str[i]) - int(n_str[i+1])) > 1:
      j=False
  if j:
    c+=1
  if c==K:
    print(n)
    break
Problem p02765 (python)

Fixed submission:
N,R = map(int, input().split())
if N > 10:
  print(R)
else:
  print(R + (100 * (10 - N)))

Buggy submission (verdict: Runtime Error):
N,R = input().split()
if N > 10:
  print(R)
else:
  print(R + (100 * (10 - N)))

Buggy submission (verdict: Runtime Error):
N,R = input().split()
if N > 10:
  print(R)
else:
  R + (100 * (10 - N))