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

Fixed submission:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n, a, b = MAP()

# x = n // (a + b)
# pr/int(x)
x = 0
x = (n // (a + b)) * a
y = 0
if a != 0:
    y = n % (a+b)
    if not 0 <= y <= a:
        y = a

print(x + y)

Buggy submission (verdict: Runtime Error):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n, a, b = MAP()

# x = n // (a + b)
# pr/int(x)
x = 0
x += (n // (a + b)) * a
x += (n % (a+b)) % b
print(x)
Problem p03013 (python)

Fixed submission:

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
# def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M = MAP()
A = [INT() for _ in range(M)]

b = [0] * (N + 2)
# 壊れているところが1
for i in A:
    b[i] = 1

dp = [0] * (N + 2)
# for i in range():

dp[0] = 1

if b[1] == 1:
    # あなあいてるのでそのルートは考えられない
    dp[1] = 0
else:
    dp[1] = 1

for i in range(2, N + 1):
    if b[i] == 1:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]

ans = dp[N] % mod
print(ans)

Buggy submission (verdict: Runtime Error):

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
# def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M = MAP()
A = [INT() for _ in range(M)]

b = [0] * (N + 2)
# 壊れているところが1
for i in A:
    b[i] = 1

dp = [0] * (N + 2)
# for i in range():

dp[0] = 1

if b[1] == 1:
    # あなあいてるのでそのルートは考えられない
    dp[1] = 0
else:
    dp[1] = 1

for i in range(2, N + 1):
    if b[i] == 1:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]

ans = dp[i] % mod
print(ans)
Problem p03053 (python)

Fixed submission:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

h, w = MAP()
A = [list(input()) for i in range(h)]


def bfs():
    que = deque([])
    
    dx = [0, 1, 0, -1]
    dy = [1, 0, -1, 0]

    d = [[INF] * w for i in range(h)]
    
    for i in range(h):
        for j in range(w):
            if A[i][j] == "#":
                sy, sx = i, j
                d[sy][sx] = 0
                que.append((sy, sx))
    ans = 0
    while que:
        p = que.popleft()
        for i in range(4):
            ny, nx = p[0] + dy[i], p[1] + dx[i]
            
            if 0 <= ny < h and 0 <= nx < w and d[ny][nx] == INF and A[ny][nx] == ".":
                d[ny][nx] = d[p[0]][p[1]] + 1
                # A[ny][nx] = "#"
                que.append((ny, nx))
 
                ans = max(ans, d[ny][nx])     
#    print(*d, sep="\n")
    return ans


if __name__ == "__main__":
    print(bfs())

Buggy submission (verdict: Runtime Error):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

h, w = MAP()
A = [list(input()) for i in range(h)]

def bfs():
    que = deque([])
    
    dx = [0, 1, 0, -1]
    dy = [1, 0, -1, 0]

    d = [[INF] * w for i in range(h)]
     
    for i in range(h):
        for j in range(w):
            if A[i][j] == "#":
                sy, sx = j, i
                d[sy][sx] = 0
                que.append((sy, sx))
    while que:
        p = que.popleft()
        for i in range(4):
            ny, nx = p[0] + dy[i], p[1] + dx[i]
            
            if 0 <= ny < h and 0 <= nx < w and d[ny][nx] == INF:
                d[ny][nx] = d[p[0]][p[1]] + 1
                A[ny][nx] = "#"
                que.append((ny, nx))
                 
    return d

ans = 0
for l in bfs():
    ans = max(ans, max(l))
print(ans)
Problem p03137 (python)

Fixed submission:
import pdb
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort()
d=[]
if n<m:
    for i in range(0,len(x)-1):
        d.append(x[i+1]-x[i])
    d.sort(reverse=True)
    for i in range(n-1):
        d.pop(0)
    ans=sum(d)
    print(ans)
else:#koma are assigned
    print(0)
#pdb.set_trace()

Buggy submission (verdict: Runtime Error):
import pdb
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort()
d=[]
if len(x)!=1:
    for i in range(0,len(x)-1):
        d.append(x[i+1]-x[i])
    d.sort(reverse=True)
    for i in range(n-1):
        d.pop(0)
    ans=sum(d)
    print(ans)
else:
    print(0)
#pdb.set_trace()
Problem p03208 (python)

Fixed submission:
n,k=map(int,input().split())
h=[int(input()) for i in range(n)]
h.sort()
#for i in range(n-k+1):
print(min(h[i+k-1]-h[i] for i in range(n-k+1)))

Buggy submission (verdict: Runtime Error):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, K = MAP()
H = [INT() for i in range(N)]
H.sort()
ans = INF
for i in range(N-K+1):
    mi = H[i:i+K][0]
    ma = H[i:i+K][2]
    tmp = ma - mi
    ans = min(tmp, ans)
print(ans)
Problem p03209 (python)

Fixed submission:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, X = MAP()

# a_0 = 1, p_0 = 1
a, p = [1], [1]
for i in range(N):
    # 漸化式
    a.append(a[i] * 2 + 3)
    p.append(p[i] * 2 + 1)

def f(N, X):
    if N == 0:
        if X <= 0:
            return 0
        if X > 0:
            return 1
    elif X <= a[N-1] + 1:
        return f(N-1, X-1)
    elif X > a[N-1] + 1:
        return p[N-1] + 1 + f(N-1, X - (a[N-1] + 1 + 1))

print(f(N, X))

Buggy submission (verdict: Runtime Error):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, X = MAP()

# a_0 = 1, p_0 = 1
a, p = [1], [1]
for i in range(N):
    # 漸化式
    a.append(a[i] * 2 + 3)
    p.append(p[i] * 2 + 1)

def f(N, X):
    if N == 0:
        if X <= 0:
            return 0
        if X == 0:
            return 1
    elif X <= a[N-1] + 1:
        return f(N-1, X-1)
    elif X > a[N-1] + 1:
        return p[N-1] + 1 + f(N-1, X - (a[N-1] + 1 + 1))

print(f(N, X))
Problem p03774 (python)

Fixed submission:
N, M = list(map(int, input().split()))
P, CP = [], []

for i in range(N):
    P.append(list(map(int, input().split())))
for i in range(M):
    CP.append(list(map(int, input().split())))

for i in range(N):
    a, b = P[i][0], P[i][1]
    now = 10**10
    for j in reversed(range(M)):
        c, d = CP[j][0], CP[j][1]
        distance = abs(a-c)+abs(b-d)
        if distance <= now:
            result = j+1
            now = distance
    print(result)

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
P, CP = [], []
 
for i in range(N):
    P.append(list(map(int, input().split())))
for i in range(M):
    CP.append(list(map(int, input().split())))
 
for i in range(N):
    a, b = P[i][0], P[i][1]
    now = 10**8*2+1
    for j in reversed(range(M)):
        c, d = CP[j][0], CP[j][1]
        distance = abs(a-c)+abs(b-d)
        if distance <= now:
            result = j+1
            now = distance
    print(result)

Buggy submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
P, CP = [], []

for i in range(N):
    P.append(list(map(int, input().split())))
for i in range(M):
    CP.append(list(map(int, input().split())))

for i in range(N):
    a, b = P[i][0], P[i][1]
    now = 10**8*2+1
    for j in reversed(range(M)):
        c, d = CP[j][0], CP[j][1]
        distance = abs(a-c)+abs(b-d)
        if distance <= now:
            result = j+1
            now = distance
    print(result)
Problem p02829 (python)

Fixed submission:
A = int(input())
B = int(input())

print(6 - A - B)

Buggy submission (verdict: Runtime Error):
import math

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

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

print(lcm(A, B))
Problem p02831 (python)

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

def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

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

ans = lcm(A, B)
print(int(ans))

Buggy submission (verdict: Runtime Error):
#%%
import math

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

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

ans = lcm(A, B)
print(ans)

Buggy submission (verdict: Runtime Error):
import math

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

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

print(lcm(A, B))

Buggy submission (verdict: Runtime Error):
import math

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

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

print(lcm(A, B))
Problem p02623 (python)

Fixed submission:
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
AA = A
BB = B
for i in range(1,N):
    AA[i] += AA[i-1]
for i in range(1,M):
    BB[i] += BB[i-1]
AA = [0] + AA
BB = [0] + BB
import bisect
c = bisect.bisect_right(AA,K)
ans = 0
for i in range(c):
    ans = max(ans, i + bisect.bisect_right(BB,K-AA[i]) - 1)
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = 0
b = 0
ans = 0
if sum(A) + sum(B) <= K:
    print(N+M)
    exit()
A.append(10**9+1)
B.append(10**9+1)
while min(A[a],B[b]) <= K:
    if A[a] == B[b]:
        AA = A[a+1:N]
        BB = B[b+1:M]
        for i in range(1,len(AA)):
            AA[i] += AA[i-1]
        for i in range(1,len(BB)):
            BB[i] += BB[i-1]
        l = 0
        r = len(AA)-1
        w = K - A[a]
        while r - l > 1:
            m = (r+l)//2
            if AA[m] == w:
                r = m
                break
            elif AA[m] < w:
                l = m
            else:
                r = m
        if BB[l+1] <= w:
            K -= B[b]
            b += 1
        else:
            K -= A[a]
            a += 1
    elif A[a] == min(A[a],B[b]):
        K -= A[a]
        a += 1
    else:
        K -= B[b]
        b += 1
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = 0
b = 0
ans = 0
if sum(A) + sum(B) <= K:
    print(N+M)
    exit()
A.append(10**9+1)
B.append(10**9+1)
while min(A[a],B[b]) <= K:
    if A[a] == B[b]:
        aa = a
        bb = b
        while A[aa] == B[bb]:
            aa += 1
            bb += 1
        if A[aa] < B[bb]:
            K -= A[a]
            a += 1
        else:
            K -= B[b]
            b += 1
    elif A[a] == min(A[a],B[b]):
        K -= A[a]
        a += 1
    else:
        K -= B[b]
        b += 1
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = 0
b = 0
ans = 0
if sum(A) + sum(B) <= K:
    print(N+M)
    exit()
while min(A[a],B[b]) <= K:
    if a == N:
        K -= B[b]
        b += 1
    elif b == M:
        K -= A[a]
        a += 1
    elif A[a] == min(A[a],B[b]):
        K -= A[a]
        a += 1
    else:
        K -= B[b]
        b += 1
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = 0
b = 0
ans = 0
if sum(A) + sum(B) <= K:
    print(N+M)
    exit()
while min(A[a],B[b]) <= K:
    if A[a] == min(A[a],B[b]):
        K -= A[a]
        a += 1
    else:
        K -= B[b]
        b += 1
    ans += 1
print(ans)
Problem p02659 (python)

Fixed submission:
A,B = map(str,input().split())
a = int(A)
b = int(B[0])*100 + int(B[2])*10 + int(B[3])
print((a*b)//100)

Buggy submission (verdict: Runtime Error):
A,B = map(float,input().split())
ans = str(A*B)
if ans[-3] == '.':
    a = ans[0:len(ans) - 3]
    print(int(a))
else:
    a = ans[0:len(ans) - 2]
    print(int(a))

Buggy submission (verdict: Runtime Error):
A,B = map(float,input().split())
ans = A*B
if ans >= 1:
    ans = str(A*B)
    a = ans[0:len(ans)-2]
    print(int(a))
else:
    print(0)
Problem p02699 (python)

Fixed submission:
S,W = map(int,input().split())
if W >= S:
    print('unsafe')
else:
    print('safe')

Buggy submission (verdict: Runtime Error):
S,W = map(int,input().split())
if W >= S:
    print('unsafe')
else:
    print(safe)

Buggy submission (verdict: Runtime Error):
S,W = map(int,input().split())
if W >= S:
    print('unsafe')
else:
    print(safe)

Buggy submission (verdict: Runtime Error):
S,W = map(int,input().split())
if W >= S:
    print('unsafe')
else:
    print(safe)
Problem p02831 (python)

Fixed submission:
A,B = map(int, input().split())
import fractions
print((A*B) // fractions.gcd(A,B))

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
import math
print((A*B) // math.gcd(A,B))

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
import math
print((A*B)//math.gcd(A,B))
Problem p02881 (python)

Fixed submission:
N = int(input())
s = 0
for i in range(1,round(N**0.5)+1):
    if N % i == 0:
        s = i
print(s+N//s-2)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = 0
for i in range(1,round(N**0.5)):
    if N % i == 0:
        s = i
print(s+N//s-2)
Problem p02759 (python)

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

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)a
    B.append(b)'''

#def sol(n,):    
    
def main():
    import sys
    input = sys.stdin.readline
    

    n = int(input())
    if n % 2 == 0:
        print(int(n/2))
    else:
        print(int(n//2+1))





if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
n = input()
if n%2==0:
  print(n/2)
else:
  print(n//2+1)
Problem p02831 (python)

Fixed submission:
#n = int(input())
#L = list(map(int, input().split()))
import math
import sys
import fractions
a = list(map(int, input().split()))

print(a[0]*a[1]//fractions.gcd(a[0], a[1]))

Buggy submission (verdict: Runtime Error):
import math
a = list(map(int, input().split()))
print(a[0]*a[1]//math.gcd(a[0],a[1]))

Buggy submission (verdict: Runtime Error):
import math
a = list(map(int, input().split()))
print(int(a[0]*a[1]/math.gcd(a[0],a[1])))
Problem p02935 (python)

Fixed submission:

N = int(input())
#s = input()
#S = []
#for i in range(N):
S = input().split(" ")
for i in range(N):
    S[i] = float(S[i])
S.sort()
for i in range(N-1):
    S[i+1] = (float(S[i])+float(S[i+1])) / 2.000000
print(S[N-1])

Buggy submission (verdict: Runtime Error):

N = int(input())
#s = input()
#S = []
#for i in range(N):
S = input().split(" ")
for i in range(N):
    S[i] = int(S[i])
for i in range(N):
    S[i+1] = (int(S[i])+int(S[i+1])) / 2
print(S[N-1])
Problem p02951 (python)

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)

Buggy submission (verdict: Runtime Error):

N = int(input())
H = []
H = input().split(" ")
for i in range(N):
    H[i] = int(H[i])

ochinchin = True
for i in range(1, N):
    if H[i]<H[i-1]:
        H[i-1] -= 1
        if H[i]<H[i-1]:
            ochinchin = False
            break
        elif i >= 2:
            if H[i-1]<H[i-2]:
                ochinchin = False
                break

if ochinchin:
    print("Yes")
else:
    print("No")

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

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

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

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N:
    print("Yes")
else:
    print("No")

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

for i in range(N-2):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

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

for i in range(N-1):
    if A[i] >> A[i+1]:
        A[i] -= 1
    if A[i+1] >= A[i]:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
unchi = 0
for i in range(1,a):
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)

Buggy submission (verdict: Runtime Error):
a = int(input())
unchi = 0
for i in range(a):
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)

Buggy submission (verdict: Runtime Error):
a = int(input())
unchi = 0
while a>=1:
    a -= 1
    if 99999 >= a >= 10000:
        unchi += 1
    elif 999 >= a >= 100:
        unchi += 1
    elif 9 >= a >= 1:
        unchi += 1
print(unchi)

Buggy submission (verdict: Runtime Error):
from sys import stdin
a = stdin.readline().rstrip()
b = stdin.readline().rstrip()
c = stdin.readline().rstrip()

A = int(a)
B = int(b)
C = int(c)


X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
from sys import stdin
A = stdin.readline()
B = stdin.readline()
C = stdin.readline()

X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)

Buggy submission (verdict: Runtime Error):

X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)

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

X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)