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

Fixed submission:
#n,l = map(int,input().split())
#l = kist(input())

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

ttl = sum(l)

m = int(input())

for i in range(m):
    p,x = map(int,input().split())
    print(ttl-l[p-1]+x)

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

n = int(input())
l = list(map(int,input()))

ttl = sum(l)

m = int(input())

for i in range(m):
    p,x = map(int,input().split())
    print(ttl-l[p-1]+x)
Problem p03943 (python)

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

a.sort()

if a[0]+a[1]==a[2]:
    print("Yes")
else:
    print("No")

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

a.sort()

if a[0]+a[1]==a[2]:
    print("Yes")
elif:
    print("No")
Problem p03962 (python)

Fixed submission:
#n = int(input())
a,b,c = map(int,input().split())

if (a==b and b == c):
    print(1)
elif (a==b or b == c or a == c):
    print(2)

else:
    print(3)

Buggy submission (verdict: Runtime Error):
#n = int(input())
a,b,c = map(int,input().spkit())

if (a==b and b == c):
    print(1)
elif (a==b or b == c or a == c):
    print(2)

else:
    print(3)

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

if (a==b and b == c):
    print(1)
elif (a==b or b == c or a == c):
    print(2)

else:
    print(3)
Problem p04043 (python)

Fixed submission:
a = list(map(int,input().split()))
  
a.sort()
  
ans = True
  
if a[0] != 5:
    ans = False
if a[1] != 5:
    ans = False
if a[2] != 7:
    ans = False

if(ans):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):

  a = list(map(int,input().split()))
  
a.sort()
  
ans = True
  
if a[0] != 5:
    ans = False
if a[1] != 5:
    ans = False
if a[2] != 7:
    ans = False

if(ans):
    print("Yes")
else:
    print("No")
Problem p02536 (python)

Fixed submission:
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 same(self, x, y):
        return self.find(x) == self.find(y)
    
N,M=map(int,input().split())
uf=UnionFind(N)
for i in range(M):
    a,b=map(int,input().split(' '))
    uf.union(a-1,b-1)

ans=sum([1 for i in uf.parents if i<0])-1
print(ans)

Buggy submission (verdict: Runtime Error):
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 same(self, x, y):
        return self.find(x) == self.find(y)
    
N,M=map(int,input().split())
uf=UnionFind(N)
for i in range(M):
    a,b=map(int,input().split(' '))
    uf.union(a,b)

ans=sum([1 for i in uf.parents if i==-1])
print(ans)
Problem p02548 (python)

Fixed submission:
def ndt(n):
    table = [0] * (n + 1)
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    return table

N=int(input())
print(sum(ndt(N-1)))

Buggy submission (verdict: Runtime Error):
import sympy

N=int(input())
count=0
for i in range(1,N):
    count+=len(sympy.divisors(i))
    
print(count)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(a*b)
Problem p02690 (python)

Fixed submission:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

x=int(input())
div=make_divisors(x)
def depth_limited(x,div):
    depth=-50
    while True:
        depth+=50
        for t in div:
            for b in range(depth,depth+50):
                if x==t*(5*b**4+10*b**3*t+10*b**2*t**2+5*b*t**3+t**4):
                    return (b+t,b)
                b=-b
                if x==t*(5*b**4+10*b**3*t+10*b**2*t**2+5*b*t**3+t**4):
                    return (b+t,b)
ans=depth_limited(x,div)
print(str(ans[0])+' '+str(ans[1]))

Buggy submission (verdict: Runtime Error):
x=int(input())
div=make_divisors(x)
def depth_limited(x,div):
    depth=-50
    while True:
        depth+=50
        for t in div:
            for b in range(depth,depth+50):
                if x==t*(5*b**4+10*b**3*t+10*b**2*t**2+5*b*t**3+t**4):
                    return (b+t,b)
                b=-b
                if x==t*(5*b**4+10*b**3*t+10*b**2*t**2+5*b*t**3+t**4):
                    return (b+t,b)
ans=depth_limited(x,div)
print(str(ans[0])+' '+str(ans[1]))
Problem p03164 (python)

Fixed submission:
N,W=map(int,input().split(' '))
w=[0]*N ; v=[0]*N
for i in range(N):
    w[i],v[i]=map(int,input().split(' '))
S=sum(v)
A=0
dp=[[sum(w)]*S for _ in range(N+1)]
for i in range(N):
    for j in range(S):
        if j<v[i]:
            dp[i+1][j]=min(dp[i][j],w[i])
        else:
            dp[i+1][j]=min(dp[i][j],dp[i][j-v[i]]+w[i])
        if dp[i+1][j]>W:
            A=j
            break
        if j==S-1:
          A=j+1
print(A)

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split(' '))
w=[0]*N ; v=[0]*N
for i in range(N):
    w[i],v[i]=map(int,input().split(' '))
dp=[[0]*(W+1) for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,W+1):
        if j<w[i-1]:
            dp[i][j]=dp[i-1][j]
        else:
            dp[i][j]=max(dp[i-1][j],dp[i-1][j-w[i-1]]+v[i-1])
print(dp[N][W])
Problem p02600 (python)

Fixed submission:
score = [1800,1600,1400,1200,1000, 800, 600, 400]
ranks = [   1,   2,   3,   4,   5,   6,   7,   8]

x = int(input())
i = 0

while(x < score[i]):
      i += 1

print(ranks[i])

Buggy submission (verdict: Runtime Error):
n = int(input())
stocks = [int(x) for x in input().split()]
mymoney = 1000
mystock = 0

for i in range(0,len(stocks)-1):     # コメントアウト部分はデバッグ用コード
      #print(stocks[i],stocks[i+1],end=":")
      if stocks[i] < stocks[i+1]:    # 明日の方が株価が高くなる場合は、今日のうちに株を買えるだけ買う
            #print("buying",end=" ")
            mystock = mymoney//stocks[i]
            mymoney = mymoney%stocks[i]
      elif stocks[i] >= stocks[i+1]:  # 明日の方が株価が安くなる場合には、今日のうちに手持ちの株を売却
            #print("selling",end=" ")
            mymoney += mystock*stocks[i]
            mystock = 0
      #print(mymoney,mystock)

i += 1
mymoney += mystock * stocks[i]      # 最終日に手持ちの株をすべて売却して現金化
mystock = 0

print(mymoney)

Buggy submission (verdict: Runtime Error):
score = [1800,1600,1400,1200,1000, 800, 600, 400]
ranks = [   1,   2,   3,   4,   5,   6,   7,   8]

x = int(input())
i = 0

while(x <= score[i]):
      i += 1

print(ranks[i])

Buggy submission (verdict: Runtime Error):
score = [1800,1600,1400,1200,1000, 800, 600, 400]
ranks = [   1,   2,   3,   4,   5,   6,   7,   8]

x = int(input())
i = 0

while(x <= score[i]):
      print(x,score[i])
      i += 1

print(ranks[i])

Buggy submission (verdict: Runtime Error):
score = [1999,1799,1599,1399,1199,999,799,599]
ranks = [   1,   2,   3,   4,   5,  6,  7,  8]

x = int(input())
i = 0

while(x <= score[i]):
      i += 1

print(ranks[i-1])

Buggy submission (verdict: Runtime Error):
score = [1999,1799,1599,1399,1199,999,799,599]

x = int(input())
i = 0

while(x <= score[i]):
      i += 1

print(i)
Problem p02584 (python)

Fixed submission:
X, K, D = list(map(int,input().rstrip().split()))
X = abs(X)
a = X//D
if K <= a:
    print(abs(X-(D*K)))
elif (K-a)%2 == 0:
    print(abs(X-(D*a)))
else:
    print(abs(D*(a+1)-X))

Buggy submission (verdict: Runtime Error):
X, K, D = list(map(int,input().rstrip().split()))
X = abs(X)
a = X//D
if K <= a:
    print(abs(X-(D*K)))
elif (K-a)a%2 == 0:
    print(abs(X-(D*a)))
else:
    print(abs(D*(a+1)-X))
Problem p02732 (python)

Fixed submission:
stdin =open(0).read().split('\n')
N=int(stdin[0])
A=list(map(int,stdin[1].split()))
from collections import Counter
C=Counter(A)
ans=0
for i in C.values():
    ans+=i*(i-1)//2
for a in A:
    num = C[a]
    print(ans-num*(num-1)//2+(num-1)*(num-2)//2)

Buggy submission (verdict: Runtime Error):
stdin =open(0).read().split('\n')
N=int(stdin[0])
A=list(map(int,stdin[1].split()))
from collections import Counter
C=Counter(A)
ans=0
for i in set(A):
    d[i]=A.count(i)
    ans+=d[i]*(d[i]-1)//2
for a in A:
    num = C[a]
    print(ans-num*(num-1)//2+(num-1)*(num-2)//2)
Problem p02761 (python)

Fixed submission:
stdin = open(0).read().split('\n')
N, M = map(int,stdin[0].split())
if M ==0:
    num=['0']*N
    if N!=1:
        num[0]='1'
    ans = "".join(num)
    print(int(ans))
else:
    num=['a']*N
    flag = True
    for i in range(M):
        s, c = stdin[i+1].split()
        if N!=1 and s=='1' and c=='0':
            flag = False
            break            
        elif not num[int(s)-1].isdecimal():
            num[int(s)-1]=c
        elif num[int(s)-1]!=c:
            flag = False
            break
    if num[0]=='a':num[0]='1'
    ans = "".join(num).replace('a', '0')
    print(int(ans) if (ans[0]!='0' or N==1) and flag else -1)

Buggy submission (verdict: Runtime Error):
stdin = open(0).read().split('\n')
N, M = map(int,stdin[0].split())
if N==0:
    list=['0']
    for j in range(M):
        s, c = stdin[j+1].split()
        if list[int(s)-1]!=c:flag=False
    if flag:
        print(i)
        exit()
else:
    for i in range(10**(N-1),10**N):
        list=[str(i)]
        flag=True
        for j in range(M):
            s, c = stdin[j+1].split()
            if list[int(s)-1]!=c:flag=False
        if flag:
            print(i)
            exit()
print(-1)
Problem p02936 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
def dfs(tree, n, ans):
    for i in tree[n]:
        ans[i] += ans[n]
        tree[i].remove(n)
        dfs(tree, i, ans)

n, q = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(n-1)]
px = [list(map(int,input().split())) for _ in range(q)]

g = [[] for _ in range(n)]
for i in range(n-1):
    g[ab[i][0]-1].append(ab[i][1]-1)
    g[ab[i][1]-1].append(ab[i][0]-1)

ans = [0]*n
for i in range(q):
    ans[px[i-1][0]-1] += px[i-1][1]
dfs(g, 0, ans)

print(*ans)

Buggy submission (verdict: Runtime Error):
def dfs(tree, n, ans):
    for i in tree[n]:
        ans[i] += ans[n]
        tree[i].remove(n)
        dfs(tree, i, ans)

n, q = map(int,input().split())
ab = [list(map(int,input().split())) for _ in range(n-1)]
px = [list(map(int,input().split())) for _ in range(q)]

g = [[] for _ in range(n)]
for i in range(n-1):
    g[ab[i][0]-1].append(ab[i][1]-1)
    g[ab[i][1]-1].append(ab[i][0]-1)

ans = [0]*n
for i in range(q):
    ans[px[i-1][0]-1] += px[i-1][1]
dfs(g, 0, ans)

print(*ans)
Problem p03043 (python)

Fixed submission:
N, K = list(map(int,input().rstrip().split()))
ans = 0
for i in range(1,N+1):
    p = 1/N
    if i<K:
        while i<K:
            i *= 2
            p *= 0.5
    ans += p
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = list(map(int,input().rstrip().split()))
ans = 0
for i in range(1,N+1):
    p = 1/N
    if j<K:
        while i<K:
            i *= 2
            p *= 0.5
    ans += p
print(ans)
Problem p02554 (python)

Fixed submission:
N = int(input())
mod = 10**9+7
print ((pow(10,N,mod) - 2*pow(9,N,mod) + pow(8,N,mod)) % mod)

Buggy submission (verdict: Runtime Error):
n = int(input())
mod = 10**9+7
print ((pow(10,N,mod) - 2*pow(9,N,mod) + pow(8,N,mod)) % mod)
Problem p03493 (python)

Fixed submission:
S = list(input())
print(S.count("1"))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
c=0
while True:
    for i in range(N):
        if A[i] % 2 !=0:
            print(c)
            exit()
        else:
            A[i] = A[i] / 2
    c=c+1

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
A=[]
for i in range(N):
    a=int(input())
    A.append(a)
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
A=[]
for i in range(N):
    A.append(int(input()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)
Problem p03494 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
c=0
while True:
    for i in range(N):
        if A[i] % 2 !=0:
            print(c)
            exit()
        else:
            A[i] = A[i] / 2
    c=c+1

Buggy submission (verdict: Runtime Error):
N = int(input())
A=[]
for i in range(N):
    A.append(int(input()))
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)
Problem p03611 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B=[]
C=[]
for i in range(N):
    B.append(A[i]-1)
for i in range(N):
    C.append(A[i]+1)
D=[]
D=A+B+C
mx=0
E=[0]*10**6
for i in D:
    E[i]+=1
    
print(max(E))

Buggy submission (verdict: Runtime Error):
A = list(map(int, input().split()))
B=[]
C=[]
for i in range(N):
    B.append(A[i]-1)
for i in range(N):
    C.append(A[i]+1)
D=[]
D=A+B+C

mx=0
for i in D:
    cnt=0
    for j in range(N):
        if i==A[j]:
            cnt+=1
        elif i==B[j]:
            cnt+=1
        elif i==C[j]:
            cnt+=1
    mx=max(mx,cnt)
print(mx)
Problem p03078 (python)

Fixed submission:
x,y,z,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
a.sort(reverse = True)
b.sort(reverse = True)
c.sort(reverse = True)
h = []
for i in range(x):
    for j in range(y):
        if(i*j>k): break
        for l in range(z):
            if(i*j*l>k): break
            h.append(a[i] + b[j] +c[l])
h.sort(reverse = True)
for i in range(k):
    print(h[i])

Buggy submission (verdict: Runtime Error):
x,y,z,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
a.sort(reverse = True)
b.sort(reverse = True)
c.sort(reverse = True)
h = []
for i in range(x):
    if(i + 1>k) : break
    for j in range(y):
        if((i + 1)*(j + 1)j>k): break
        for l in range(z):
            if((i + 1)*(j + 1)*(l + 1)>k): break
            h.append(a[i] + b[j] +c[l])
h.sort(reverse = True)
for i in range(k):
    print(h[i])
Problem p02606 (python)

Fixed submission:
numbers = [i for i in map(int, input().split())]
number_list = [i+numbers[0] for i in range(numbers[1]-numbers[0]+1)]
count = 0
for i in number_list:
  if i % numbers[2] == 0:
    count+=1
print(count)

Buggy submission (verdict: Runtime Error):
numbers = map(int, input().split())
number_list = [i+numbers[0] for i in range(numbers[1]-numbers[0])]
count = 0
for i in numbers_list:
  if number_list % numbers[2] == 0:
    count+=1
print(count)
Problem p02621 (python)

Fixed submission:
number = int(input())
print(number + number**2 + number**3)

Buggy submission (verdict: Runtime Error):
number = int(intput())
print(number + number**2 + number**3)
Problem p02658 (python)

Fixed submission:
n = int(input())
a = [i for i in map(int, input().split())]
 
if a.count(0) != 0:
  print(0)
else:
  result = 1
  for i in range(n):
    result *= a[i]
    if result > (10**18):
      print(-1)
      break
    else:
      continue
  else:
    print(result)

Buggy submission (verdict: Runtime Error):
#include <iostream>
using namespace std;
int n;
int numbers[110];
int result;
int main() {
  cin >> n;
  for(int i; i<n; i++){
    cin >> numbers[i]
  }
  for(int i; i<sizeof(numbers)/sizeof(array[0]); i++){
    if(i == 0){
      cout << "0";
    }else{
      result *= numbers[i]
    }
  }
  if(result > pow(10,18.0)){
    cout << "-1"
  }else{
    cout << result
  }
}
Problem p02818 (python)

Fixed submission:
a,b,k = map(int, input().split())
if a <= k:
    k -= a
    if b <= k:
        k -= b
        print(0,0)
    else:
        print(0,b-k)
else:
    print(a-k,b)

Buggy submission (verdict: Runtime Error):
data = map(int,input().split())
for i in range(data[2]):
  if data[0] >= 1:
    data[0] -= 1
  elif data[1] >=1:
    data[1] -=1
print(f'{data[0]} {data[1]}')
Problem p02717 (python)

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

print(c, a, b)

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        

abs_N(n, k)
Problem p02719 (python)

Fixed submission:
import sys
n ,k = map(int, input().split())
if n == k or k == 1:
    print(0)
    sys.exit()
else:
    n %= k
print(min(n, abs(n-k)))

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
 
 
if n == k or k == 1:
    print(0)
    sys.exit()
    
def min_N(n, k):
    b = abs(n-k)
    if b == 0:
        print(0)
        sys.exit()
    elif b == 1:
        print(1)
        sys.exit()
    elif n < b:
        print(n)
        sys.exit()
    n = b
    min_N(n, k)

min_N(n, k)

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif m == 0:
        print(0)
        sys.exit
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        
abs_N(n, k)

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif m == 0:
        print(0)
        sys.exit
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        
abs_N(n, k)

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        

abs_N(n, k)

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        

abs_N(n, k)

Buggy submission (verdict: Runtime Error):
import sys
n ,k = map(int, input().split())
m = 0

if n == k or k == 1:
    print(0)
    sys.exit()
    
def abs_N(n, k):
    m = abs(n-k)
    compare_N_M(n, m)

def compare_N_M(n, m):
    if m == 1:
        print(1)
        sys.exit()
    elif n >= m:
        n = m
        abs_N(n, k)
    else:
        print(n)
        sys.exit()
        

abs_N(n, k)
Problem p02783 (python)

Fixed submission:
h, a = map(int, input(). split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n)

Buggy submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while h <= 0:
    h = h - a
    n = n + 1
print(n)

Buggy submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= 0:
        break
print(n)

Buggy submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h <= a:
        break
print(n)

Buggy submission (verdict: Runtime Error):
h, a = map(int, input(), split())
n = 0
while True:
    h = h - a
    n = n + 1
    if h >= a:
        break
print(n)
Problem p02789 (python)

Fixed submission:
n, m = map(int, input().split())
if n == m:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
p_list = list(map(int, input().split()))
flg = 0
i_sum = 0
for i in range(1, n):
    for j in range(1, i+1):
        if p_list[j] >= p_list[i]:
            flg += 1
            if flg == i:
                i_sum += 1
                flg = 0
                continue
        else:
            flg = 0
            continue
        
print(i_sum +1)
Problem p02801 (python)

Fixed submission:
alph = input()
print(chr(ord(alph)+1))

Buggy submission (verdict: Runtime Error):
alph = input()
print(ord(alph+1))