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

Fixed submission:
b, c = list(map(int, input().split()))
if 500 * b >= c :
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
b, c = list(map(int, input().split()))
if 500 * b => c :
    print("Yes")
else:
    print("No")
Problem p02817 (python)

Fixed submission:
A, W = list(map(str, input().split()))
output = W + A
print(output)

Buggy submission (verdict: Runtime Error):
A, W = list(map(str, input().split()))
output = W + A
print(output)
Problem p03737 (python)

Fixed submission:
a, b, c = map(str,input().split())
print((a[0] + b[0] + c[0]).upper())

Buggy submission (verdict: Runtime Error):
a, b, c = map(str,input().split())
print(upper(a[0] + b[0] + c[0]))
Problem p02573 (python)

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

def readInt():
    return list(map(int, input().split()))

n, m = readInt()

root = [-1] * n

def r(x):
    # print("root[x]=",root[x])
    if root[x] < 0:
        # print("r(x)=",x)
        return x
    else:
        root[x] = r(root[x])
        # print(root[x])
        return root[x]

def unite(x, y):
    x = r(x)
    y = r(y)
    if x == y:
        return
    root[x] += root[y]
    root[y] = x
    # print(root)

def size(x):
    x = r(x)
    # print(x, root[x])
    return -root[x]

for i in range(m):
    x, y = readInt()
    x -= 1
    y -= 1
    unite(x, y)

max_size = 0

for i in range(n):
    max_size = max(max_size, size(i))

print(max_size)

Buggy submission (verdict: Runtime Error):
def readInt():
    return list(map(int, input().split()))

n, m = readInt()

root = [-1] * n

def r(x):
    # print("root[x]=",root[x])
    if root[x] < 0:
        # print("r(x)=",x)
        return x
    else:
        root[x] = r(root[x])
        # print(root[x])
        return root[x]

def unite(x, y):
    x = r(x)
    y = r(y)
    if x == y:
        return
    root[x] += root[y]
    root[y] = x
    # print(root)

def size(x):
    x = r(x)
    # print(x, root[x])
    return -root[x]

for i in range(m):
    x, y = readInt()
    x -= 1
    y -= 1
    unite(x, y)

max_size = 0

for i in range(n):
    max_size = max(max_size, size(i))

print(max_size)
Problem p02708 (python)

Fixed submission:
import itertools
def readInt():
    return list(map(int,input().split()))
n, k = readInt()
ans = 0
# l = [int(x) for x in range(n+1)]
for i in range(k,n+2):
    smallest = (i-1)*i /2
    largest = n*(n+1)/2 - (n-i)*(n-i+1)/2
    ans += int(largest - smallest + 1)
    ans %= 10**9 + 7
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
import numpy as np
def readInt():
    return list(map(int,input().split()))
n, k = readInt()
ans = 0
l = [int(x) for x in range(n+1)]
for i in range(k,n+2):
    # print(i, ".")
    c_l = list(itertools.combinations(np.mod(l,10**9+7),i))
    a = []
    for j in range(len(c_l)):
        # print(sum(c_l[j]))
        a.append(sum(c_l[j]))
        # print(a)
    # print(a)
    # print(set(a))
    # print(c_l)
    ans += np.mod(len(set(a)),10**9+7)
print(ans)
Problem p02713 (python)

Fixed submission:
import math

n = int(input())
ans = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            ans += math.gcd(i, math.gcd(j,k))

print(ans)

Buggy submission (verdict: Runtime Error):
import fractions

n = int(input())
ans = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            ans += fractions.gcd(i, gcd(j,k))

print(ans)

Buggy submission (verdict: Runtime Error):
import math

n = int(input())
ans = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            ans += math.gcd(i, gcd(j,k))

print(ans)
Problem p02741 (python)

Fixed submission:
s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(s[k-1])

Buggy submission (verdict: Runtime Error):
s = [str(x) for x in input().split(',')]
k = int(input())
print(s[k-1])
Problem p03502 (python)

Fixed submission:
n = int(input())
sum = 0
m = n
while n > 0:
    sum = sum + (n % 10)
    n = int(n / 10)
    # print(n)
    # print(sum)

    
if m % sum == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
sum = 0
m = n
while n > 0:
    n = int(n / 10)
    # print(n)
    sum = sum + (n % 10)

    
if m % sum == 0:
    print("Yes")
else:
    print("No")
Problem p02706 (python)

Fixed submission:
N,M = (int(x) for x in input().split())

hw = [int(x) for x in input().split()]

hwsum = 0

for n in range(len(hw)):
  hwsum += hw[n]

if hwsum<=N:
  print(N-hwsum)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
N,M = (int(x) for x in input.split())

hw = [int(x) for x in input().split()]

hwsum = 0

for n in range(len(hw)-1):
  hwsum += hw[n]

if hwsum<=N:
  print(N-hwsum)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
N,M = (int(x) for x in input.split())

hw = [int(x) for x in input().split()]

hwsum = 0

for n in range(len(hw)-1):
  hwsum += hw[n]

if hwsum<=N:
  print(N-hwsum)
else:
  print(-1)
Problem p02658 (python)

Fixed submission:
import sys

def main():
    n = int(input())
    a=sys.stdin.readline().rstrip().split()
    if '0' in a:
        print(0)
        return
    ans=1
 
    for i in a:
        ans=ans*int(i)
        if ans>1000000000000000000:
            print("-1")
            return
    else:
        print(ans)
main()

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

if n%2==0:
	ans=1
	for i in range(n//2):
		ans=ans*a[i]*a[i+n//2]
else:
	if n==1:
		ans=a[0]
	else:
		ans=a[0]
		for i in range(1,i(n-1)//2+1):
			ans=ans*a[i]*a[i+(n-1)//2]

if ans>1000000000000000000:
	print("-1")
else:
	print(ans)

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

if n%2==0:
	ans=1
	for i in range(n/2):
		ans=ans*a[i]*a[i+n/2]
else:
	if n==1:
		ans=a[0]
	else:
		ans=a[0]
		for i in range(1,int((n-1)/2)+1):
			ans=ans*a[i]*a[i+int((n-1)/2)]

if ans>1000000000000000000:
	print("-1")
else:
	print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque

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

if n%2==0:
	ans=1
	for i in range(n/2):
		ans=ans*a[i]*a[i+n/2]
else:
	if n==1:
		ans=a[0]
	else:
		ans=a[0]
		for i in range(1,int((n-1)/2)+1):
			ans=ans*a[i]*a[i+int((n-1)/2)]

if ans>1000000000000000000:
	print("-1")
else:
	print(ans)
Problem p02700 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
ah=a
ch=c
while(1):
    ah-=d
    ch-=b
    if(ch<=0):
        print("Yes")
        break
    elif(ah<=0):
        print("No")
        break

Buggy submission (verdict: Runtime Error):
                                                                                                                                                                                                                               a,b,c,d = map(int,input().split())
ah=a
ch=c
while(1):
    ah-=d
    ch-=b
    if(ch<=0):
        print("Yes")
        break
    elif(ah<=0):
        print("No")
        break

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

Takahashi=a/d
Aoki=c/b-1                                                                                                                                                                                                                           if Takahashi>=Aoki:
    print("Yes")
else:
    print("No")
Problem p02536 (python)

Fixed submission:

N,M = map(int, input().split())
A = [-1 for i in range(M)]
B = [-1 for i in range(M)]
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

for i in range(M):
    A[i],B[i] = map(int, input().split())

uf = UnionFind(N)

for i in range(M):
    uf.union(A[i]-1,B[i]-1)

print(uf.group_count()-1)

Buggy submission (verdict: Runtime Error):
import numpy as np
from scipy.sparse.csgraph import connected_components
N,M = map(int, input().split())
A = [-1 for i in range(M)]
B = [-1 for i in range(M)]

mat = np.zeros((N,N),dtype=np.uint8)

for i in range(M):
    A[i],B[i] = map(int, input().split())

for i in range(M):
    mat[A[i]-1][B[i]-1] = 1
    mat[B[i]-1][A[i]-1] = 1


n, labels = connected_components(mat)
print(n-1)
Problem p02573 (python)

Fixed submission:
import sys

sys.setrecursionlimit(10**6)

N,M = map(int,input().split())

E_list = [[]for i in range(N)]

marks = [False for i in range(N)]
m = 1
def dfs(n):
    global E_list
    global marks
    global N,M

    marks[n] = True

    steps = 1

    for nx in E_list[n]:
        if not marks[nx]:
            marks[nx] = True
            steps += dfs(nx)
    
    return steps



for i in range(M):
    e1,e2 = map(int, input().split())
   
    E_list[e1-1].append(e2-1)
    E_list[e2-1].append(e1-1)


for i in range(N):
    E_list[i] = list(set(E_list[i]))

for i in range(N):
    if not marks[i]:
        st = dfs(i)

    m = max(m,st)

print(m)

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

E_list = [[]for i in range(N)]

marks = [False for i in range(N)]

def dfs(n):
    global E_list
    global marks
    global N,M

    marks[n] = True

    steps = 1

    for nx in E_list[n]:
        if not marks[nx]:
            marks[nx] = True
            steps += dfs(nx)
    
    return steps



for i in range(M):
    e1,e2 = map(int, input().split())
   
    E_list[e1-1].append(e2-1)
    E_list[e2-1].append(e1-1)

m = 1



for i in range(N):
    if not marks[i]:
        st = dfs(i)

    m = max(m,st)

print(m)

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

E_list = [[]for i in range(N)]

marks = [False for i in range(N)]

def dfs(n):
    global E_list
    global marks
    global N,M

    marks[n] = True

    steps = 1

    for nx in E_list[n]:
        if not marks[nx]:
            marks[nx] = True
            steps += dfs(nx)
    
    return steps



for i in range(M):
    e1,e2 = map(int,input().split())
   
    E_list[e1-1].append(e2-1)
    E_list[e2-1].append(e1-1)

m = 1


for i in range(N):
    E_list[i] = list(set(E_list[i]))
for i in range(N):
    if not marks[i]:
        st = dfs(i)

    m = max(m,st)


print(m)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
E = [[0,0]for i in range(M)]
E_list = [[]for i in range(N)]

marks = [False for i in range(N)]

def dfs(n):
    global E_list
    global marks
    global N,M

    marks[n] = True

    steps = 1

    for nx in E_list[n]:
        if not marks[nx]:
            marks[nx] = True
            steps += dfs(nx)
    
    return steps



for i in range(M):
    E[i] = list(map(int, input().split()))
    E_list[E[i][0]-1].append(E[i][1]-1)
    E_list[E[i][1]-1].append(E[i][0]-1)

m = 1


for i in range(N):
    E_list[i] = list(set(E_list[i]))
for i in range(N):
    if not marks[i]:
        st = dfs(i)

    m = max(m,st)


print(m)
Problem p02690 (python)

Fixed submission:
X=int(input())
A=0
B=0
flag = False
for a in range(120):
    for b in range(120):
        if a**5 - b**5 == X:
            A=a
            B=b
            flag = True

        if a ** 5 + b**5 == X:
            A=a
            B=-b

        if -a**5 + b**5 ==X:
            A =-a
            B = b

        if flag:
            break
    if flag:
        break
print(str(A)+" "+str(B))

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

p = [0]*1000

flag = False
for i in range(1000):
    p[i] = i**5

for i in range(1,1000):
    for j in range(1,1000):
        if p[i]-p[j] == X:
            a = i
        
            b = j
            flag=True
        if p[i] + p[j] ==X:
            a=i
            b=-j
            flag=True


        if flag:
            break
    if flag:
        break

print(str(a)+" "+str(b))

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

p = [0]*1000

flag = False
for i in range(1000):
    p[i] = i**5

for i in range(1,1000):
    for j in range(1,1000):
        if p[i]-p[j] == X or flag:
            a = i
        
            b = j
            flag=True
        if p[i] + p[j] ==X or flag:
            a=i
            b=-j
            flag=True
        if flag:
            break
    if flag:
        break

print(str(a)+" "+str(b))

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

p = [0]*100

flag = False
for i in range(100):
    p[i] = i**5

for i in range(1,100):
    for j in range(1,100):
        if p[i]-p[j] == X or flag:
            a = i
        
            b = j
            flag=True
        if p[i] + p[j] ==X or flag:
            a=i
            b=-j
            flag=True
        if flag:
            break
    if flag:
        break

print(str(a)+" "+str(b))

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

p = [0]*100

flag = False
for i in range(100):
    p[i] = i**5

for i in range(1,100):
    for j in range(1,100):
        if p[i]-p[j] == X or flag:
            a = i
        
            b = j
            flag=True
        if p[i] + p[j] ==X or flag:
            a=i
            b=-j
            flag=True
        if flag:
            break
    if flag:
        break
            
print(flag)
print(str(a)+" "+str(b))

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

p = [0]*100

flag = False
for i in range(100):
    p[i] = i**5

for i in range(100):
    for j in range(100):
        if p[i]-p[j] == X or flag:
            a = i
        
            b = j
            flag=True
        if p[i] + p[j] ==X or flag:
            a=i
            b=-j
            flag=True
        if flag:
            break
    if flag:
        break
            
print(str(a)+" "+str(b))
Problem p02727 (python)

Fixed submission:
X,Y,A,B,C = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

p = p[0:X]
q = q[0:Y]

p.extend(q)
p.extend(r)

p.sort(reverse=True)
s=0
for i in range(X+Y):
    s+=p[i]
print(s)

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

p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))
result = 0
Z = 0
p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

pindex = 0
qindex = 0
rindex = 0
while (X>0 or Y>0) and X+Y-Z>0:
        
    
    if (X>0 or Y>0) and X+Y-Z>0:
        if p[pindex]>=q[qindex] and p[pindex]>=r[rindex] and X > 0:
            result += p[pindex]
            pindex += 1
            X-=1
        elif q[qindex]>=p[pindex] and q[qindex]>=r[rindex] and Y > 0:
            result += q[qindex]
            
            qindex +=1
            Y-=1
        elif r[rindex]>=q[qindex] and r[rindex]>=p[pindex]:
        
            result += r[rindex]
            rindex += 1
            Z+=1

        elif X > 0:
            result += p[pindex]
            pindex += 1
            X-=1
        elif Y > 0:
            result += q[qindex]
            
            qindex +=1
            Y-=1
       
print(result)
Problem p02743 (python)

Fixed submission:
a,b,c=map(int, input().split())
if c-a-b<0:
  print("No")
else:
  if 4*a*b<(c-a-b)**2:
    print("Yes")
  else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int, input().split())
if c-a-b<0:
  print("No")
else:
  if 4ab<(c-a-b)**2:
    print("Yes")
  else:
    print("No")
Problem p02911 (python)

Fixed submission:
V = input().split()
N = int(V[0])
K = int(V[1])
Q = int(V[2])
A = [0 for i in range(Q)]
P = [K for i in range(N)]
for i in range(Q):
    A[i] = int(input())

for i in range(Q):
    P[A[i]-1] += 1

for i in range(N):
    if P[i] - Q <=0:
        print("No")
    if P[i] - Q > 0:
        print("Yes")

Buggy submission (verdict: Runtime Error):
V = input().split()
N = int(V[0])
K = int(V[1])
Q = int(V[2])
A = [0 for i in range(Q)]
P = [K for i in range(N)]
for i in range(Q):
    A[i] = int(input())

for i in range(Q):
    P[A[i]+1] += 1

for i in range(N):
    if P[i] - Q <=0:
        print("No")
    if P[i] - Q > 0:
        print("Yes")

Buggy submission (verdict: Runtime Error):
V = input().split()
N = int(V[0])
K = int(V[1])
Q = int(V[2])
A = [0 for i in range(Q)]
P = [K for i in range(N)]
for i in range(Q):
    A[i] = int(input())

for i in range(Q):
    P[A[i]] += 1

for i in range(N):
    if P[i] <= Q:
        print("No")
    if P[i] > Q:
        print("Yes")
Problem p03147 (python)

Fixed submission:
N=int(input())
h=list(map(int,input().split()))
h.append(0)
ans=0
flag = False
for hei in range(1,101):
  for i in range(N+1):
    if h[i] >= hei and i!=N:
      flag = True
    else:
      if flag:
        ans+=1
        flag = False
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
h=list(map(int,input().split()))
ans=0
flag = False
for hei in range(1,101):
  for i in range(N+1):
    if h[i] >= hei or i!=N:
      flag = True
    else:
      if flag:
        ans+=1
        flag = False
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
h=list(map(int,input().split()))
ans=0
flag = False
for hei in range(1,101):
  for i in range(N+1):
    if h[i] >= hei and i!=N:
      flag = True
    else:
      if flag:
        ans+=1
        flag = False
print(ans)
Problem p03633 (python)

Fixed submission:
def gcd(a, b):
    if b == 0:
        return a
    
    return gcd(b, a % b)

def lcm(a, b):
    return a * b // gcd(a, b)

N = int(input())
T = []

for i in range(N):
    t = int(input())
    T.append(t)
    
ans = 1
for i in range(N):
    ans = lcm(ans, T[i])
    
print(ans)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    if b == 0:
        return a
    
    return gcd(b, a % b)

def lcm(a, b):
    return a * b // math.gcd(a, b)

N = int(input())
T = []

for i in range(N):
    t = int(input())
    T.append(t)
    
ans = 1
for i in range(N):
    ans = lcm(ans, T[i])
    
print(ans)

Buggy submission (verdict: Runtime Error):
import math

def lcm(a, b):
    return a * b // math.gcd(a, b)

N = int(input())
T = []

for i in range(N):
    t = int(input())
    T.append(t)
    
ans = 1
for i in range(N):
    ans = lcm(ans, T[i])
    
print(ans)
Problem p03071 (python)

Fixed submission:
A,B = input().split(' ')

A = int(A)
B = int(B)

if A > B :
    X = A
    A = A - 1

else :
    X = B
    B = B - 1

if A > B :
    X = X + A
else :
    X = X + B

print(X)

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

A = int(A)
B = int(B)

if A > B :
    X = A
    A = A - 1

else :
    X = B
    B = B - 1

if A > B :
    X = X + A
else :
    X = X + B

print(X)

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

A = int(A)
B = int(B)

if A > B :
    X = A
    A = A - 1

else :
    X = B
    B = B - 1

if A > B :
    X = X + A
else :
    X = X + B

print(X)

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

if A < B :
    X = A
    A = A - 1
else :
    X = B
    B = B - 1
if A > B :
    X = X + A
else :
    X = X + B

print(X)
Problem p02600 (python)

Fixed submission:
x = int(input())
 
if 400 <= x <= 599:
    print(8)
elif 600 <= x <= 799:
    print(7)
elif 800 <= x <= 999:
    print(6)
elif 1000 <= x <= 1199:
    print(5)
elif 1200 <= x <= 1399:
    print(4)
elif 1400 <= x <= 1599:
    print(3)
elif 1600 <= x <= 1799:
    print(2)
elif 1800 <= x <= 1999:
    print(1)

Buggy submission (verdict: Runtime Error):
x = int(input())
 
if 400 <= x <= 599:
    print(8)
elif 600 <= x <= 799:
    print(7)
elif 800 <= x <= 999:
    prnit(6)
elif 1000 <= x <= 1199:
    print(5)
elif 1200 <= x <= 1399:
    print(4)
elif 1400 <= x <= 1599:
    print(3)
elif 1600 <= x <= 1799:
    print(2)
elif 1800 <= x <= 1999:
    print(1)

Buggy submission (verdict: Runtime Error):
x=int(input())
 
if 400 <= x <= 599:
    print(8)
elif 600 <= x <= 799:
    print(7)
elif 800 <= x <= 999:
    prnit(6)
elif 1000 <= x <= 1199:
    print(5)
elif 1200 <= x <= 1399:
    print(4)
elif 1400 <= x <= 1599:
    print(3)
elif 1600 <= x <= 1799:
    print(2)
elif 1800 <= x <= 1999:
    print(1)

Buggy submission (verdict: Runtime Error):
X=int(input())
 
if 400 <= X <= 599:
    print(8)
elif 600 <= X <= 799:
    print(7)
elif 800 <= X <= 999:
    prnit(6)
elif 1000 <= X <= 1199:
    print(5)
elif 1200 <= X <= 1399:
    print(4)
elif 1400 <= X <= 1599:
    print(3)
elif 1600 <= X <= 1799:
    print(2)
elif 1800 <= X <= 1999:
    print(1)

Buggy submission (verdict: Runtime Error):
X=int(input())
 
if 400<=X<=599:
    print(8)
elif 600<=X<=799:
    print(7)
elif 800<=X<=999:
    prnit(6)
elif 1000<=X<=1199:
    print(5)
elif 1200<=X<=1399:
    print(4)
elif 1400<=X<=1599:
    print(3)
elif 1600<=X<=1799:
    print(2)
elif 1800<=X<=1999:
    print(1)

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

if x<400:
    print(8)
elif 400<=X<=599:
    print(8)
elif 600<=X<=799:
    print(7)
elif 800<=X<=999:
    prnit(6)
elif 1000<=X<=1199:
    print(5)
elif 1200<=X<=1399:
    print(4)
elif 1400<=X<=1599:
    print(3)
elif 1600<=X<=1799:
    print(2)
elif 1800<=X<=1999:
    print(1)
else:
    print(1)

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

if 400<=X<=599:
    print(8)
elif 600<=X<=799:
    print(6)
elif 800<=X<=999:
    prnit(6)
elif 1000<=X<=1199:
    print(5)
elif 1200<=X<=1399:
    print(4)
elif 1400<=X<=1599:
    print(3)
elif 1600<=X<=1799:
    print(2)
elif 1800<=X<=1999:
    print(1)

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

if 400<=X<=599:
    print(8)
elif 600<=X<=799:
    print(7)
elif 800<=X<=999:
    prnit(6)
elif 1000<=X<=1199:
    print(5)
elif 1200<=X<=1399:
    print(4)
elif 1400<=X<=1599:
    print(3)
elif 1600<=X<=1799:
    print(2)
elif 1800<=X<=1999:
    print(1)

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

if 0<=X<=399:
    print(9)
elif 400<=X<=599:
    print(8)
elif 600<=X<=799:
    print(7)
elif 800<=X<=999:
    prnit(6)
elif 1000<=X<=1199:
    print(5)
elif 1200<=X<=1399:
    print(4)
elif 1400<=X<=1599:
    print(3)
elif 1600<=X<=1799:
    print(2)
elif 1800<=X<=1999:
    print(1)
else:
    print(0)
Problem p02694 (python)

Fixed submission:
X=int(input())
yokin=100
year=0

while yokin<X:
    yokin=int(yokin*1.01)
    year=year+1

print(year)

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
C=B-A
if C>=K:
    print("OK")
elif A%K==0:
    print("OK")
elif B%K==0:
    print("OK")
else:
    print("NG")
Problem p02658 (python)

Fixed submission:
def check() -> int:
    n = int(input())
    n_l = list(map(int, input().split()))

    VORDER = 10 ** 18
    ans = 1

    if 0 in n_l:
        ans = 0
    else:
        for i in n_l:
            ans = i * ans
            if ans > VORDER:
                ans = -1
                break
    return ans


if __name__ == '__main__':
    print(check())

Buggy submission (verdict: Runtime Error):
def check() -> int:
    n = int(input())
    n_l = list(map(int, input().split()))
    VORDER = 10 ** 18
    ans = 1
    
    if 0 in n_l:
        ans = 0
        break
    else:
        for i in n_l:
            ans = i * ans
            if  ans > VORDER:
                ans = -1
                break
    return ans
if __name__ == '__main__':
    print(check())