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

Fixed submission:
from bisect import bisect_left
x, n = map(int, input().split())
if n != 0:
    P = list(map(int, input().split()))
    P = sorted(P)
else:
    P = []

flag = False
ans = []
if x not in P or n == 0:
    ans.append(x)
else:
    idx = bisect_left(P, x)
    for i in range(1, 110):
        for_num = P[idx] + i
        bac_num = P[idx] - i
        if for_num not in P:
            ans.append(for_num)
            flag = True
        if bac_num not in P:
            ans.append(bac_num)
            flag = True
        if flag:
            break

print(min(ans))

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
x, n = map(int, input().split())
if n != 0:
    P = list(map(int, input().split()))
    P = sorted(P)
else:
    P = []

flag = False
ans = []
if x not in P or n == 0:
    ans.append(x)
elif n == 100:
    ans.append(0)
else:
    idx = bisect_left(P, x)
    for i in range(n):
        for_num = P[idx] + i
        bac_num = P[idx] - i
        if for_num not in P:
            ans.append(for_num)
            flag = True
        if bac_num not in P:
            ans.append(bac_num)
            flag = True
        if flag:
            break

print(min(ans))

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
x, n = map(int, input().split())
if n != 0:
    P = list(map(int, input().split()))
    P = sorted(P)
else:
    P = []

flag = False
ans = []
if x not in P or n == 0:
    ans.append(x)
else:
    idx = bisect_left(P, x)
    for i in range(n):
        for_num = P[idx] + i
        bac_num = P[idx] - i
        if for_num not in P:
            ans.append(for_num)
            flag = True
        if bac_num not in P:
            ans.append(bac_num)
            flag = True
        if flag:
            break

print(min(ans))

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
x, n = map(int, input().split())
if n != 0:
    P = list(map(int, input().split()))
    P = sorted(P)
else:
    P = []

flag = False
ans = []
if x not in P or n == 0:
    ans.append(x)
else:
    idx = bisect_left(P, x)
    for i in range(n):
        for_num = P[idx] + 1
        bac_num = P[idx] - 1
        if for_num not in P:
            ans.append(for_num)
            flag = True
        if bac_num not in P:
            ans.append(bac_num)
            flag = True
        if flag:
            break

print(min(ans))
Problem p02714 (python)

Fixed submission:
n = int(input())
s = input()
r = 0
g = 0
b = 0
for x in s:
    if x == 'R':
        r += 1
    elif x == 'G':
        g += 1
    elif x == 'B':
        b += 1

ng_cnt = 0
for i in range(n):
    for j in range(i+1, n):
        if s[i] == s[j]:
            continue
        else:
            k = 2 * j - i
            if k < n and s[i] != s[k] and s[j] != s[k]:
                ng_cnt += 1

print(r * g * b - ng_cnt)

Buggy submission (verdict: Runtime Error):
from itertools import product
n = int(input())
s = input()
r = []
g = []
b = []
for i in range(len(s)):
    if s[i] == 'R':
        r.append(i)
    elif s[i] == 'G':
        g.append(i)
    elif s[i] == 'B':
        b.append(i)

ng_cnt = 0
for i in range(n):
    for j in range(i+1, n):
        if s[i] == s[j]:
            continue
        else:
            k = 2 * j - i
            if k < n and s[i] != s[k] and s[j] != s[k]:
                ng_cnt += 1

print(r * g * b - ng_cnt)
Problem p02958 (python)

Fixed submission:
n = int(input())
s = list(map(int, input().split()))
l = sorted(s)
cnt = 0
for i in range(len(s)):
    if s[i] != l[i]:
        cnt += 1

print('NO' if cnt > 2 else 'YES')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int, input().split()))
l = sort(s)
cnt = 0
for i in range(len(s)):
    if s[i] != l[i]:
        cnt += 1

print('NO' if cnt > 2 else 'YES')
Problem p02999 (python)

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

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

Fixed submission:
n , x = map(int, input().split())
l = list(map(int, input().split()))
tmp = [0] * (n + 1)
sum = 0
for i in range(n):
    sum += l[i]
    tmp[i + 1] = sum 

cnt = 0
for i in range(len(tmp)):
    if tmp[i] <= x:
        cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n , x = map(int, input().split())
l = list(map(int, input().split()))
cnt = 0
s = 0
for i in range(l):
    s += i
    if s <= x:
        cnt += 1
    else:
        break

print(cnt)

Buggy submission (verdict: Runtime Error):
N, X = map(int, input().split())
L = list(map(int,input().split()))
D=0

for i in range(N):
    D = D + L[i]
    if D > X:
        a = i
        break

print(str(a+1))
Problem p03059 (python)

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

i = int((T + 0.5) // A)

print(int(B * i))

Buggy submission (verdict: Runtime Error):
A, B, T = int(input().split())

i = int((T + 0.5) // A)

print(int(B * i))

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

B = int(input())

T = int(input())

i = int((T + 0.5) // A)

print(int(B * i))

Buggy submission (verdict: Runtime Error):
A = int(input())
T = int(input())
i = int((T + 0.5)/A)
biscuit = A * i

print(biscuit)
Problem p03087 (python)

Fixed submission:
n, q = map(int, input().split())
s = input()
lst = [0] * q
for i in range(q):
    l, r = map(int, input().split())
    lst[i] = (l, r)

cum = [0] * (n + 1)
for i in range(n):
    cum[i + 1] = cum[i]
    if i < n - 1 and s[i] == 'A' and s[i + 1] == 'C':
        cum[i + 1] += 1

for x in lst:
    print(cum[x[1]-1] - cum[x[0]-1])

Buggy submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
lst = [0] * q
for i in range(q):
    l, r = map(int, input().split())
    lst[i] = (l, r)

cum = [0] * (n + 1)
for i in range(n):
    cum[i + 1] = cum[i]
    if s[i] == 'A' and s[i + 1] == 'C':
        cum[i + 1] += 1

for x in lst:
    print(cum[x[1]-1] - cum[x[0]-1])
Problem p03238 (python)

Fixed submission:
n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a + b)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())
print('Hello world' if n == 1 else a + b)
Problem p03352 (python)

Fixed submission:
from bisect import bisect_left
import math
n = int(input())
lst = []
lst.append(1)
for i in range(2, int(math.sqrt(1000)) + 1):
    for j in range(2, 10):
        if i ** j <= 1000 and i ** j not in lst:
            lst.append(i ** j)

lst.sort()
print(lst[bisect_left(lst, n) - 1] if n not in lst else lst[bisect_left(lst, n)])

Buggy submission (verdict: Runtime Error):
from bisect import bisect_left
n = input()
lst = []
lst.append(1)
for i in range(2, int(math.sqrt(1000)) + 1):
    for j in range(2, 10):
        if i ** j <= 1000 and i ** j not in lst:
            lst.append(i ** j)

lst.sort()
print(lst[bisect_left(lst, n) - 1] if n not in lst else lst[bisect_left(lst, n)])
Problem p03399 (python)

Fixed submission:
print(min(int(input()), int(input())) + min(int(input()), int(input())))

Buggy submission (verdict: Runtime Error):
print(min(int(input(), int(input()))) + min(int(input(), int(input()))))
Problem p03424 (python)

Fixed submission:
n = int(input())
s = input().split()
print('Three' if len(set(s)) == 3 else 'Four')

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(map(int, input().split()))
print('Three' if len(set(s)) == 3 else 'Four')
Problem p03437 (python)

Fixed submission:
x, y = map(int, input().split())
if x > y:
    if x % y == 0:
        print(-1)
    else:
        print(x * 1)
elif x == y:
    print(-1)
elif x < y:
    print(x * 1)

Buggy submission (verdict: Runtime Error):
x, y = int(input())
if x % y == 0 or  y % x == 0:
    print(-1)
else:
    print(x * 1)
Problem p03447 (python)

Fixed submission:
x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)

Buggy submission (verdict: Runtime Error):
x = int().input()
a = int().input()
b = int().input()
print((x - a) % b)
Problem p03720 (python)

Fixed submission:
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    print(i)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    pront(i)

Buggy submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
L = [0] * n
for i in range(m):
    a, b = map(int, input().split())
    L[a - 1] += 1
    L[b - 1] += 1

for i in L:
    pront(i)

Buggy submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
L = []
for _ in range(m):
    a, b = map(int, input().split())
    L.append(a)
    L.append(b)

L_dict = collections.Counter(L)
L_dict_sort = sorted(L_dict.items(), key = lambda x:x[0])
for i in range(n):
    print(L_dict_sort[i][1])

Buggy submission (verdict: Runtime Error):
import collections
n, m = map(int, input().split())
L = []
for _ in range(m):
    a, b = map(int, input().split())
    L.append(a)
    L.append(b)

L_dict = collections.Counter(L)
L_dict_sort = sorted(L_dict.items(), key=lambda x:x[0])
for i in range(n):
    print(L_dict_sort[i][1])
Problem p03760 (python)

Fixed submission:
O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(len(O)):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]

print(password)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(max_len):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]

print(password)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(max_len):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]
else:
    for i in range(len(E)):
        if i != len(E) - 1:
            password += O[i] + E[i]
        else:
            password += E[i]

print(password)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(max_len):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]
elif dif_len < 0:
    for i in range(len(E)):
        if i != len(E) - 1:
            password += O[i] + E[i]
        else:
            password += E[i]

print(password)

Buggy submission (verdict: Runtime Error):
O = input()
E = input()
dif_len = len(O) - len(E)
password = ''

if dif_len == 0:
    for i in range(max_len):
        password += O[i] + E[i]
elif dif_len > 0:
    for i in range(len(O)):
        if i != len(O) - 1:
            password += O[i] + E[i]
        else:
            password += O[i]
elif dif_len < 0:
    for i in range(len(E)):
        if i != len(E) - 1:
            password += O[i] + E[i]
        else:
            password += E[i]

print(password)
Problem p03773 (python)

Fixed submission:
A, B = map(int, input().split())
print((A + B) % 24)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())
print((A + B) % 24)
Problem p03777 (python)

Fixed submission:
a, b = input().split()
if a == b :
    print('H')
else :
    print('D')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a == b :
    print('H')
else :
    print('T')
Problem p03957 (python)

Fixed submission:
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
  
print('Yes' if flag == True else 'No')

Buggy submission (verdict: Runtime Error):
s = input()
flag = True
if 'C' not in s or 'F' not in s:
  flag = False

print('Yes' if s.index('C') < s.rindex('F') and flag == True else 'No')

Buggy submission (verdict: Runtime Error):
s = input()
print('Yes' if s.index('C') < s.rindex('F') else 'No')

Buggy submission (verdict: Runtime Error):
s = input()
print('Yes' if s.index('C') < s.rindex('F') else 'No')
Problem p03962 (python)

Fixed submission:
N = input().split()
num = len(set(N))
print(num)

Buggy submission (verdict: Runtime Error):
N = input().split()
d = dict.fromkeys(N, 0)
for n in N:
    d[n] += 1

print(sum(d.values())

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a == b and b == c:
    print(1)
elif a == b or a == c:
    print(2)
else:
    print(3)

N = input().split()
d = dict.fromkeys(N, 0)
for n in N:
    d[n] += 1

print(sum(d.values())
Problem p04043 (python)

Fixed submission:
a = [x for x in input().split()]
cnt_5 = 0
cnt_7 = 0
for x in a:
    if x == '5':
        cnt_5 += 1
    elif x == '7':
        cnt_7 += 1

print('YES' if cnt_5 == 2 and cnt_7 == 1 else 'NO')

Buggy submission (verdict: Runtime Error):
N = map(int, input().split())
for n in N:
    if n == 5 :
        cnt_5 += 1
    elif n == 7 :
        cnt_7 += 1

if cnt_5 == 2 & cnt_7 == 1:
    print('Yes')
else:
    print('N0')
Problem p04045 (python)

Fixed submission:
from collections import deque
n, k = map(int, input().split())
D = list(map(int, input().split()))
ok_lst = [x for x in range(0, 10) if x not in D]
stack = deque([x for x in ok_lst if x != 0])
while len(stack) > 0:
    now_num = stack.popleft()
    if now_num >= n:
        print(now_num)
        break
    for x in ok_lst:
        next_num = str(now_num) + str(x)
        stack.append(int(next_num))

Buggy submission (verdict: Runtime Error):
from collections import deque
n, k = map(int, input().split())
D = list(map(int, input().split()))

# 1. 初期化
ok_lst = [x for x in range(0, 10) if x not in D]
ok_lst.sort(reverse = True)
stack = deque([x for x in ok_lst if x != 0])

while len(stack) > 0:
    # 2. 現在の情報の取得
    # 今回は現在の数字
    now_num = stack.pop()
    # 3. 処理
    # もしnow_numの桁数がnの桁数と同じかつ条件の値以上の場合，ansに記録しwhileを終了．
    # もしnow_numの桁数がnの桁数と同じかつ条件の値未満の場合，次は数値を足すとまずいのでcontinueで防ぐ
    if len(str(now_num)) == len(str(n)) and now_num >= n:
        ans = now_num
        break
    if len(str(now_num)) == len(str(n)) and now_num < n:
        continue
    # 4. 更新
    for x in ok_lst:
        next_num = str(now_num) + str(x)
        next_num = int(next_num)
        stack.append(next_num)

print(ans)
Problem p02606 (python)

Fixed submission:
l, r, d = map(int, input().split())
c = 0
for i in range(l,r+1):
  if i % d == 0:
    c += 1
print(c)

Buggy submission (verdict: Runtime Error):
l, r, d = map(int, input().split())
c = 0
for i in range(l,r+1):
  if i % d = 0:
    c += 1
print(c)
Problem p02719 (python)

Fixed submission:
i = [int(x) for x in input().split()]
n = i[0]
k = i[1]

t = n % k
t2 = k -t

print(min(t, t2))

Buggy submission (verdict: Runtime Error):
i = [int(i) for i in input().split()]
n = i[0]
k = i[1]
n2 = n % k
print(n2 if k < n2 else k % n2)
Problem p02741 (python)

Fixed submission:
a = [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()) -1

print(a[k])

Buggy submission (verdict: Runtime Error):
from math import sqrt

i = input().split()
a = int(i[0] * 1000000000000000000000000)
b = int(i[1]* 1000000000000000000000000)
c = int(i[2]* 1000000000000000000000000)

if sqrt(a) + sqrt(b) < sqrt(c):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
i = input().split()
h = int(i[0])
w = int(i[1])

if h == 1 or w == 1:
    print(1)

if (h * w % 2 == 0):
    print(h * w // 2)
else:
    print(h * w // 2 + 1)

Buggy submission (verdict: Runtime Error):
a = [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()) + 1

print(a[k])

Buggy submission (verdict: Runtime Error):
a = [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() + 1)

print(a[k])

Buggy submission (verdict: Runtime Error):
a = [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(a[k])
Problem p02742 (python)

Fixed submission:
i = input().split()
h = int(i[0])
w = int(i[1])

if h == 1 or w == 1:
    print(1)
else:
    if (h * w % 2 == 0):
        print(h * w // 2)
    else:
        print(h * w // 2 + 1)

Buggy submission (verdict: Runtime Error):
i = input().split()
h = int(i[0])
w = int(i[1])

if h == 1 || w == 1:
    print(1)

if (h * w % 2 == 0):
    print(h * w // 2)
else:
    print(h * w // 2 + 1)
Problem p02743 (python)

Fixed submission:
from math import sqrt

i = input().split()
a = int(i[0])
b = int(i[1])
c = int(i[2])

d = (c - b - a) > 0
e = (c - b - a) ** 2 > 4 * a * b

if d and e:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
from math import sqrt

i = input().split()
a = int(i[0] * (10 ** 10))
b = int(i[1]* (10 ** 10))
c = int(i[2]* (10 ** 10))

if sqrt(a) + sqrt(b) < sqrt(c):
    print("Yes")
else:
    print("No")
Problem p02602 (python)

Fixed submission:
import functools
import operator

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

# prod = functools.partial(functools.reduce, operator.mul)
# tmp_sum_prod = prod(A[:K])
for i in range(K, N):
    sum_prod = (A[i]/A[i-K])
    if sum_prod > 1.0:
        print('Yes')
    else:
        print('No')
    tmp_sum_prod = sum_prod

Buggy submission (verdict: Runtime Error):

import numpy as np

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))

for i in range(K, N+1):
    sum_prod = np.prod(A[i-K:i])
    if i > K:
        if sum_prod > tmp_sum_prod:
            print('Yes')
        else:
            print('No')
    tmp_sum_prod = sum_prod

Buggy submission (verdict: Runtime Error):
import functools
import operator
import numpy as np

N, K = list(map(int, input().split()))
A = np.array(list(map(int, input().split())))

# prod = functools.partial(functools.reduce, operator.mul)
for i in range(K, N+1):
    sum_prod = np.prod(A[i-K:i])
    if i > K:
        if sum_prod > tmp_sum_prod:
            print('Yes')
        else:
            print('No')
    tmp_sum_prod = sum_prod
Problem p03455 (python)

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

print("Even" if a*b % 2 == 0 else "Odd")

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

print("Even" if a*b % 2 == 0 else "Odd")
Problem p02861 (python)

Fixed submission:
N = int(input())
xy = [list(map(int, input().split())) for i in range(N)]
 
from itertools import permutations
from math import sqrt
 
paths = list(permutations(range(N), N))
l = len(paths)
total = 0
for path in paths:
    tmp = 0
    x, y = xy[path[0]][0], xy[path[0]][1]
    for p in path[1:]:
        px, py = xy[p][0], xy[p][1]
        tmp += sqrt((px-x)**2 + (py-y)**2)
    total += tmp
print(total / l)

Buggy submission (verdict: Runtime Error):
import numpy as np
def factorial(n):
  if (n==1):
    return 1
  return n*factorial(n-1)

n = int(input())
x = []
y = []
for i in range(n):
  x_, y_ = list(map(int, input().split()))
  x.append(x_)
  y.append(y_)
val = 0
for i in range(n):
  for j in range(i+1, n):
    val += np.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)

ans = val/factorial(n) * factorial(n-1) * 2
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
from math import factorial
n = int(input())
x = []
y = []
for i in range(n):
  x_, y_ = list(map(int, input().split()))
  x.append(x_)
  y.append(y_)
val = 0
for i in range(n):
  for j in range(i+1, n):
    val += np.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)

ans = val/factorial(n) * factorial(n-1) * 2
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
x = []
y = []
for i in range(n):
  x_, y_ = list(map(int, input().split()))
  x.append(x_)
  y.append(y_)
val = 0
for i in range(n):
  for j in range(i+1, n):
    val += np.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)

ans = val/math.factorial(n) * math.factorial(n-1) * 2
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
x = []
y = []
for i in range(n):
  x_, y_ = list(map(int, input().split()))
  x.append(x_)
  y.append(y_)
val = 0
for i in range(n):
  for j in range(i+1, n):
    val += np.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)

ans = val/math.factorial(n) * math.factorial(n-1) * 2
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
x = []
y = []
for i in range(n):
  x_, y_ = list(map(int, input().split()))
  x.append(x_)
  y.append(y_)
val = 0
for i in range(n):
  for j in range(i+1, n):
    val += np.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)

ans = val/math.factorial(n) * math.factorial(n-1) * 2
print(ans)
Problem p02687 (python)

Fixed submission:
s=input()
if s=="ABC":
  print("ARC")
elif s=="ARC":
  print("ABC")

Buggy submission (verdict: Runtime Error):
x=int(input())
for i in range(-1000:1000:1):
  for j in range(-1000:1000:1):
    if i**5-j**5==x:
      print(i,j)
      exit()

Buggy submission (verdict: Runtime Error):
s=input()
if s="ARC":
  print("ABC")
elif s="ABC":
  print("ARC")
Problem p02690 (python)

Fixed submission:
x=int(input())
for i in range(-1000,1000,1):
  for j in range(-1000,1000,1):
    if i**5-j**5==x:
      print(i,j)
      exit()

Buggy submission (verdict: Runtime Error):
x=int(input())
for i in range(-1000:1000:1):
  for j in range(-1000:1000:1):
    if i**5-j**5==x:
      print(i,j)
      exit()

Buggy submission (verdict: Runtime Error):
N=input()
flag=False
while flag:
   for i in range(-119:119:1):
    for j in range(-119:119:1):
       if i**5-j**5==x:
        flag=True
        print("{}{}",format(i,j))
        break
        
    if flag:
      break
Problem p02700 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d=,map(int,input(),split())
hpa=a
hpc=c
while (hpa!=0) and (hpc!=0):
  hpa=hpa-c
  hpc=hpc-a

if hpa=0:
  print("No")

if hpc=0:
  print("Yes")
Problem p03493 (python)

Fixed submission:
s=input()
ans=s.count("1")
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
ans=s.count(1)
print(ans)
Problem p02621 (python)

Fixed submission:
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a = I()
    print(a+a**2+a**3)

Buggy submission (verdict: Runtime Error):
2import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a = I()
    print(a+a**2+a**3)