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

Fixed submission:
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1
for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
long long n,tiln = 0;
int counter=0;
int main() {
    cin >> n;
    vector<int> a(10001);
        for(int x = 1;x<;x++){
            for(int y = 1;y<100;y++){
                for(int z = 1;z<100;z++){
                    tiln = (x*x) + (x*y) + (y*y) + z*(y+x) + z*z;
                    a(tiln)++;
                }
            }
        }
    for(int i = 1;i<=tiln;i++){
        cout << a.at(i) << endl;
    }
    return 0;
}

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1
for i in range(n):
print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
				if v<10050:
					ans[v]+=1
for i in range(n):
	print(ans[i+1])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
for j in range(1,105):
for k in range(1,105):
v = i*i+j*j+k*k+i*j+j*k+k*i;
if v<10050:
ans[v]+=1
for i in range(n):
print(ans[i+1])
Problem p02802 (python)

Fixed submission:
import collections
n,m = map(int, input().split())
ps = [list(input().split()) for _ in range(m)]

q = [0]*n
t = [0]*n

for [p,s] in ps:
    p = int(p) - 1
    if s == "AC" and q[p] == 0:
        q[p] += 1
    elif s == "WA" and q[p]== 0:
        t[p] += 1


"""
for [u,r] in ps:
    u = int(u) -1
    if q[u] == 0 and t[u] != 0:
        t[u] == 0
"""

w = 0
for i, uc in enumerate(q):
    if uc == 1:
        w += t[i]
    


print(sum(q),w)

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

q = [0]*n
t = [0]*n

for [p,s] in ps:
    p = int(p) - 1
    if s == "AC" and q[p] == 0:
        q[p] += 1
    elif s == "WA" and q[p]== 0:
        t[p] += 1

for [p,s] in ps:
    if q[p] == 0 and t[p] != 0:
        t[p] == 0


print(sum(q),sum(t))
Problem p02812 (python)

Fixed submission:
n = int(input())
s = input()
y = list(s+"JK")
ans = 0
for a in range(n):
    a = int(a)
    if y[a] == "A" and y[a+1] == "B" and y[a+2] == "C":
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
y = list(s)
ans = 0
for a in range(n):
    a = int(a)
    if y[a] == "A" and y[a+1] == "B" and y[a+2] == "C":
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
y = list(s)
ans = 0
for a in range(n):
    a = int(a)
    if y[a] == "A" and y[a+1] == "B" and y[a+2] == "C":
        ans += 1

print(ans)
Problem p03609 (python)

Fixed submission:
x,t=list(map(int,input().split(" ")))
print(max(x-t, 0))

Buggy submission (verdict: Runtime Error):
X = int(input())
t = int(input())
if t <= X:
  print(X-t)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
X = int(input())
t = int(input())
if t < X:
  print(X-t)
else:
  print (0)
Problem p03711 (python)

Fixed submission:
x,y = map(int, input().split())
A = {1, 3, 5, 7, 8, 10, 12}
B = {4, 6, 9, 11}
print("Yes" if {x, y} <= A or {x, y} <= B else "No")

Buggy submission (verdict: Runtime Error):
A,B=list(map(int,input().split(' ')))
A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
print('Yes' if {x,y} <= A or {x,y} <= B else 'No')

Buggy submission (verdict: Runtime Error):
A,B=list(map(int,input().split(" ")))
A={1,3,5,7,8,10,12}
B={4,6,9,11}
print("Yes" if {x,y} <= A or {x,y} <= B else "No")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
A={1,3,5,7,8,10,12}
B={4,6,9,11}
print("Yes" if {x,y} <= A or {x,y} <= B else "No")
Problem p03962 (python)

Fixed submission:
if __name__ == '__main__':
  s = input()
  a= [int(elem) for elem in s.rstrip().split(' ')]
  print(len(set(a)))

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
  a = []
  for i in range(3):
    a.append(int(input()))
  print(len(set(a)))

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
  a = []
  for i in range(3):
    a.append(int(input()))
  print(len(set(a)))
Problem p04011 (python)

Fixed submission:
N= int(input())
K= int(input())
X= int(input())
Y= int(input())

if N<=K:
  print (N*X)
else:
  print (K*X+(N-K)*Y)

Buggy submission (verdict: Runtime Error):
N,K,X,Y= map(int, input().split())
if N<=K:
  print(N*X)
else:
  print(N*X+(N-K)*Y)
Problem p02606 (python)

Fixed submission:
l,r,d = map(int, input().split())
print(r//d-(l-1)//d)

Buggy submission (verdict: Runtime Error):
l,r,d=map(int、input())
print(r//d - l//d)
Problem p02642 (python)

Fixed submission:
import numpy as np
from collections import Counter
n = int(input())
aa = list(map(int, input().split()))
ngs = np.zeros((10**6)+1, dtype=int)

for a in set(aa):
    ngs[2*a::a] = 1
    
dic = Counter(aa)
times = np.array(list(dic.keys()))[np.array(list(dic.values())) > 1]

for i in times:
    ngs[i] = 1
cnt = 0
for a in aa:
    cnt += 1-ngs[a]
print((cnt))

Buggy submission (verdict: Runtime Error):
import numpy as np
from collections import Counter
n = int(input())
aa = list(map(int, input().split()))
ngs = np.zeros(2*(10**5)+1, dtype=int)

for a in aa:
    ngs[2*a::a] = 1
    
dic = Counter(aa)
times = np.array(list(dic.keys()))[np.array(list(dic.values())) > 1]

for i in times:
    ngs[i] = 1
cnt = 0
for a in aa:
    cnt += 1-ngs[a]
print((cnt))
Problem p02696 (python)

Fixed submission:
a, b, n = map(int, input().split())
val = (a*n)//b - a*(n//b)
m = max(0,(n//b)*b-1)
val = max(val, (a*m)//b - a*(m//b))
print(val)

Buggy submission (verdict: Runtime Error):
import math
x = int(input())
finished = False
# b >= 0 check
a = max(0,int(math.pow(x,0.2)) - 1)
while a**5 - (a-1)**5 <= x:
    tmp = a**5 - x
    if tmp < 0:
        a += 1
        continue
    b = int(math.pow(tmp,0.2))
    if a**5 - b**5 == x:
        finished = True
        print(a,b)
        break
    a += 1
if not finished:
    a = 1
    while a**5 < x:
        tmp = x - a**5
        b = int(math.pow(tmp,0.2))
        if a**5 + b**5 == x:
            finished = True
            print(a,-b)
            break
        a += 1

Buggy submission (verdict: Runtime Error):
a, b, n = map(int, input().split())
val = max(0, (a*n)//b - a*(n//b), (a*m)//b - a*(m//b), (n//b)*b-1)
print(val)

Buggy submission (verdict: Runtime Error):
a, b, n = map(int, input().split())
val = (a*n)//b - a*(n//b)
val = max(val, (a*m)//b - a*(m//b))
print(val)

Buggy submission (verdict: Runtime Error):
val = a*n//b
for i in range(max(0,n//b - a), n//b):
    m = b*i - 1
    if (m > n) or (m < 0):
        continue
    else:
        val = max(val, (m*a)//b - i)
for i in range(max(0,n//b - a), n//b):
    m = b*i - 1
    if (m > n) or (m < 0):
        continue
    else:
        val = max(val, (m*a)//b - i)
        
print(val)
Problem p02716 (python)

Fixed submission:
input()
aa = list(map(int, input().split()))
state = {(0,False)}
skipmax = len(aa)%2 + 1
state_all = {(i, True) for i in range(skipmax+1)}.union({(j, False) for j in range(skipmax+1)})
dp_0 = {a:None for a in state_all }
dp_0[(0,False)] = 0
skipcount = 0

def getmax(a, b):
    if a is None:
        return b
    if b is None:
        return a
    return max(a,b)

for i,a in enumerate(aa):
    dp_1 = {}
    for s in state_all:
        if s[1] & (dp_0[(s[0], False)] is not None):
            dp_1[s] = dp_0[(s[0], False)] + a
            continue
        dp_1[s] = getmax(dp_0[(s[0], True)], dp_0.get((s[0]-1, False), None))
    dp_0 = dp_1.copy()
if len(aa)%2:
    print(getmax(dp_0[(2,True)], dp_0[(1,False)]))
else:
    print(getmax(dp_0[(1,True)], dp_0[(0,False)]))

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

bb = [0] * len(aa)
bb[0] = aa[0]
bb[1] = aa[1]
for i in range(2,len(aa)):
    bb[i] = bb[i-2] + aa[i]

sum0 = bb[len(aa)-2]
sum1 = bb[len(aa)-1]
ret = sum1
if len(aa)%2 == 0:
    ret = max(ret, sum0)
if len(aa)%2:
    sum0 = bb[len(aa)-1]
    sum1 = bb[len(aa)-2]
    for i in range(len(aa)//2):
        ret = max(ret, sum0 - aa[2*i])

# 0 -> 1
for i in range(0,len(aa)//2):
    try:
#        print(i, bb[2*i] - bb[2*i+3] + sum1 + aa[2*i+3])
        ret = max(ret, bb[i] - bb[i+3] + sum1 + aa[i+3] )
    except:
        0
# 1 -> 0
for i in range(0,len(aa)//2):
    try:
#        print(i, bb[2*i+1] - bb[2*i+4] + sum0 + aa[2*i+4])
        ret = max(ret, bb[2*i+1] - bb[2*i+4] + sum0 + aa[2*i+4] )
    except:
        0
print(ret)

Buggy submission (verdict: Runtime Error):
bb = [0] * len(aa)
bb[0] = aa[0]
bb[1] = aa[1]
for i in range(2,len(aa)):
    bb[i] = bb[i-2] + aa[i]

sum0 = bb[len(aa)-2]
sum1 = bb[len(aa)-1]
ret = sum1
if len(aa)%2 == 0:
    ret = max(ret, sum0)
if len(aa)%2:
    sum0 = bb[len(aa)-1]
    sum1 = bb[len(aa)-2]
    for i in range(len(aa)//2):
        ret = max(ret, sum0 - aa[2*i])

# 0 -> 1
for i in range(0,len(aa)//2):
    try:
#        print(i, bb[2*i] - bb[2*i+3] + sum1 + aa[2*i+3])
        ret = max(ret, bb[i] - bb[i+3] + sum1 + aa[i+3] )
    except:
        0
# 1 -> 0
for i in range(0,len(aa)//2):
    try:
#        print(i, bb[2*i+1] - bb[2*i+4] + sum0 + aa[2*i+4])
        ret = max(ret, bb[2*i+1] - bb[2*i+4] + sum0 + aa[2*i+4] )
    except:
        0
print(ret)
Problem p02717 (python)

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

Buggy submission (verdict: Runtime Error):
n, r = map(int, input().split())
if n >=10:
    print(r)
else:
    print(r + 100*(10-n))
Problem p02718 (python)

Fixed submission:
n, m = map(int, input().split())
aa = list(map(int, input().split()))
thre = sum(aa) / (4*m)
cnt = 0
for a in aa:
  if a >= thre:
    cnt +=1
if cnt >= m:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
aa = map(int, input().split())
thre = sum(aa) / (4*m)
cnt = 0
for a in aa:
  if a >= thre
  cnt  +=1
if cnt >= m:
  print('Yes')
else:
  print('No')
Problem p02720 (python)

Fixed submission:
k = int(input())
anss = [1,2,3,4,5,6,7,8,9]
for i in range(12):
    if len(anss) > k:
        print(anss[k-1])
        break
    new_anss = []
    for ans in anss:
        if ans % 10 != 0:
            new_anss += [ans*10+ans%10-1]
        new_anss += [ans*10+ans%10]
        if ans % 10 != 9:
            new_anss += [ans*10+ans%10+1]
    k -= len(anss)
    anss = new_anss

Buggy submission (verdict: Runtime Error):
k = int(input())
anss = [1,2,3,4,5,6,7,8,9]
for i in range(12):
    if len(anss) > k:
        print(new_anss[k-1])
        break
    new_anss = []
    for ans in anss:
        if ans % 10 != 0:
            new_anss += [ans*10+ans%10-1]
        new_anss += [ans*10+ans%10]
        if ans % 10 != 9:
            new_anss += [ans*10+ans%10+1]
    k -= len(anss)
    anss = new_anss

Buggy submission (verdict: Runtime Error):
k = int(input())
anss = [1,2,3,4,5,6,7,8,9]
for i in range(12):
    if len(anss) > k:
        print(new_anss[k-1])
        break
    new_anss = []
    for ans in anss:
        if ans % 10 != 0:
            new_anss += [ans*10+ans%10-1]
        new_anss += [ans*10+ans%10]
        if ans % 10 != 9:
            new_anss += [ans*10+ans%10+1]
    k -= len(anss)
    anss = new_anss

Buggy submission (verdict: Runtime Error):
k = int(input())
anss = [1,2,3,4,5,6,7,8,9]
for i in range(12):
    if len(anss) > k:
        print(new_anss[k-1])
        break
    new_anss = []
    for ans in anss:
        if ans % 10 != 0:
            new_anss += [ans*10+ans-1]
        new_anss += [ans*10+ans]
        if ans % 10 != 9:
            new_anss += [ans*10+ans+1]
    k -= len(anss)
    anss = new_anss
Problem p02732 (python)

Fixed submission:
input()
from collections import Counter
aa = list(map(int, input().split()))
dic = Counter(aa)

total = 0
for v in dic.values():
    total += v * (v-1) / 2

for a in aa:
    print(int(total - dic[a] + 1))

Buggy submission (verdict: Runtime Error):
input()
aa = list(map(int, input().split()))
uu = list(set(aa))
cc = uu.copy()
for i in range(len(uu)):
    cc[i] = aa.count(uu[i])
    total += cc[i] * (cc[i]-1) / 2

dic = dict(zip(uu,cc))

for a in aa:
    print(int(total - dic[a] + 1))
Problem p02760 (python)

Fixed submission:
a = input().split()
a += input().split()
a += input().split()
n = int(input())
b = set([(input()) for i in range(n)])

bingo = False
if set([a[0], a[1], a[2]]).issubset(b):
	bingo = True
if set([a[3], a[4], a[5]]).issubset(b):
	bingo = True
if set([a[6], a[7], a[8]]).issubset(b):
	bingo = True
if set([a[0], a[3], a[6]]).issubset(b):
	bingo = True
if set([a[1], a[4], a[7]]).issubset(b):
	bingo = True
if set([a[2], a[5], a[8]]).issubset(b):
	bingo = True
if set([a[0], a[4], a[8]]).issubset(b):
	bingo = True
if set([a[2], a[4], a[6]]).issubset(b):
	bingo = True
if bingo:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = input().split()
a += input().split()
a += input().split()
n = int(input())
b = set([(int)(input()) for i in range(n)])

bingo = False
if set([a[0], a[1], a[2]).issubset(b):
	bingo = True
if set([a[3], a[4], a[5]).issubset(b):
	bingo = True
if set([a[6], a[7], a[8]).issubset(b):
	bingo = True
if set([a[0], a[3], a[6]).issubset(b):
	bingo = True
if set([a[1], a[4], a[7]).issubset(b):
	bingo = True
if set([a[2], a[5], a[8]).issubset(b):
	bingo = True
if set([a[0], a[4], a[8]).issubset(b):
	bingo = True
if set([a[2], a[4], a[6]).issubset(b):
	bingo = True
print(bingo)
Problem p02768 (python)

Fixed submission:
n, a, b = map(int, input().split())
mod = 10 **9 +7
fac = [1] * 200001
inv = [1] * 200001
for i in range(1,len(fac)):
    fac[i] = fac[i-1] * i % mod
    inv[i] = pow(fac[i], mod-2, mod)

facna = 1
facnb = 1
for i in range(n-a+1,n+1):
    facna = facna * i %mod
for i in range(n-b+1,n+1):
    facnb = facnb * i %mod
ret = pow(2,n,mod) - 1 - facna * inv[a] - facnb * inv[b]
ret = ret%mod
print(ret)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
mod = 10 **9 +7
fac = [1] * 200000
inv = [1] * 200000
for i in range(1,len(fac)):
    fac[i] = fac[i-1] * i % mod
    inv[i] = pow(fac[i], mod-2, mod)

facna = 1
facnb = 1
for i in range(n-a+1,n+1):
    facna = facna * i %mod
for i in range(n-b+1,n+1):
    facnb = facnb * i %mod
ret = pow(2,n,mod) - 1 - facna * inv[a] - facnb * inv[b]
ret = ret%mod
print(ret)
Problem p02775 (python)

Fixed submission:
s = input()
state = [0, 1]
for i in s:
    n = int(i)
    state_new = [min(state[0] + n, state[1] + 10 - n), 
                 min(state[0] + n + 1, state[1] + 9 - n)]
    state = state_new
print(state[0])

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

cnt = 0
sakki5 = False
for s in a:
    if int(s) < 6:
        cnt += int(s)
        sakki6 = False
        if int(s) == 5:
            sakki5 = True
    else:
        cnt += 11 - int(s)
        if sakki6:
            cnt -= 2
        if sakki5:
            cnt -= 1
        sakki6 = True
        sakki5 = False
print(cnt)

Buggy submission (verdict: Runtime Error):
s = input()
cnt = 0
sakki5 = False
for s in a:
    if int(s) < 6:
        cnt += int(s)
        sakki6 = False
        if int(s) == 5:
            sakki5 = True
    else:
        cnt += 11 - int(s)
        if sakki6:
            cnt -= 2
        if sakki5:
            cnt -= 1
        sakki6 = True
        sakki5 = False
cnt
Problem p02789 (python)

Fixed submission:
M, N = map(int, input().split())

if M == N:
  print('Yes')
else:
  print('No')

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

dic = {}
for i in range(1,10):
  for j in range(1,10):
    dic[(str(i),str(j))] = 0

for i in range(N):
  nstr = str(i)
  pre = nstr[0]
  suf = nstr[-1]
  if suf == '0':
    continue
  dic[(pre, suf)] =dic[(pre, suf)] + 1

cnt = 0 
for i in range(1,10):
  for j in range(1,10):
    cnt += dic[(str(i),str(j))] * dic[(str(j),str(i))]

print(cnt)
Problem p02814 (python)

Fixed submission:
from fractions import gcd
n, m = map(int, input().split())
aa = list(map(int, input().split()))


lcm = 1
def p2(m):
    cnt = 0
    n = m
    while 1:
        if n%2 == 0:
            cnt += 1
            n = n//2
        else:
            break
    return cnt
pp = p2(aa[0])
for a in aa:
    lcm = a * lcm // gcd(a, lcm)
    if pp != p2(a):
        lcm = 10 **18
        break
tmp = lcm // 2
print((m // tmp + 1) // 2)

Buggy submission (verdict: Runtime Error):
from math import gcd
lcm = 1
def p2(m):
    cnt = 0
    n = m
    while 1:
        if n%2 == 0:
            cnt += 1
            n = n//2
        else:
            break
    return cnt
pp = p2(aa[0])
for a in aa:
    lcm = a * lcm // gcd(a, lcm)
    if pp != p2(a):
        lcm = 10 **18
        break
tmp = lcm // 2
print((m // tmp + 1) // 2)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
aa = list(map(int, input().split()))
from math import gcd
lcm = 1
for a in aa:
    lcm = a * lcm // gcd(a, lcm)
tmp = lcm // 2
print((m // tmp + 1) // 2)
Problem p02838 (python)

Fixed submission:
import numpy as np
n = int(input())
aa = list(map(int, input().split()))
mod = 10**9+7
res = 1
pow2 = 1
ans = 0
for i in range(60):
    cnt = np.count_nonzero(np.array(aa)&pow2)
    ans = (ans + cnt * (n-cnt) * res)%mod
    res = (res*2)%mod
    pow2*=2
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
aa = list(map(int, input().split()))
mod = 10**9+7
res = 1
pow2 = 1
ans = 0
for i in range(60):
    cnt = np.count_nonzero(np.array(aa)&2)
    ans = (ans + cnt * (n-cnt) * res)%mod
    res = (res*2)%mod
    pow2*=2
print(ans)
Problem p02899 (python)

Fixed submission:
import numpy as np
n = int(input())
aa = list(map(int, input().split()))
oo = [str(a) for a in np.argsort(aa)+1] 
print(" ".join(oo))

Buggy submission (verdict: Runtime Error):
n = int(input())
aa = list(map(int, input().split()))
oo = [str(a) for a in np.argsort(aa)+1] 
print(" ".join(oo))
Problem p02900 (python)

Fixed submission:
a, b = map(int, input().split())
from fractions import gcd
from numpy import sqrt
m = gcd(a,b)
cnt = 1
for i in range(2, int(sqrt(m))+1):
    div = False
    while m%i == 0:
        div = True
        m = m//i
    if div:
        cnt += 1
    if m == 1:
        break
if m > 1:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
from numpy import gcd, sqrt
m = gcd(a,b)
cnt = 1
for i in range(2, int(sqrt(m))+1):
    div = False
    while m%i == 0:
        div = True
        m = m//i
    if div:
        cnt += 1
    if m == 1:
        break
if m > 1:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
from numpy import gcd, sqrt
m = gcd(a,b)
cnt = 1
print(1)
for i in range(2, int(sqrt(m))+1):
    div = False
    while m%i == 0:
        div = True
        m = m//i
    if div:
        cnt += 1
        print(i)
    if m == 1:
        break
if m > 1:
    cnt += 1
    print(m)
print(cnt)
Problem p02639 (python)

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

print(15-a-b-c-d-e)

Buggy submission (verdict: Runtime Error):
a,b,c,d,e=int(input().split())
0 2 3 4 5
print(15-a-b-c-d-e)
Problem p02640 (python)

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

if(b%2==0):
    if(2*a<=b<=4*a):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
#値の入力
if(2*a<=b):
    if(b<=4*a):
        print("Yes")
    else:
        pirnt("No")
else:
    print("No")
Problem p02690 (python)

Fixed submission:
flag = 0
X = int(input())
for A in range(1000):
    if flag!=0:
        break
    for B in range(1000):
        if A**5 - B**5 == X:
            print(str(A) + " " + str(B))
            flag=1
            break
        elif A**5 + B**5 == X:
            print(str(A) + " " + str(-B))
            flag=1
            break

Buggy submission (verdict: Runtime Error):
import sys
X = int(input())
for A in range(1000):
    for B in range(1000):
        if A**5 - B**5 == X:
            print(A, B)
            sys.exit(1)
        elif A**5 + B**5 == X:
            print(A, -B)
            sys.exit(1)
Problem p03331 (python)

Fixed submission:
n=int(input())
print(min([sum([int(a) for a in str(i)])+sum([int(b) for b in str(n-i)]) for i in range(1,int(n))]))

Buggy submission (verdict: Runtime Error):
n=input()
print(sum([int(i) for i in n])
Problem p03337 (python)

Fixed submission:
num=input().split()
a=int(num[0])
b=int(num[1])
print(max([a+b,a-b,a*b]))

Buggy submission (verdict: Runtime Error):
num=input().split()
a=int(num[0])
b=int(num[1])
if a==0&&b==0:
  print(max([a+b,a-b,a*b]))
else:
  print(max([a+b,a-b,a*b,a/b]))

Buggy submission (verdict: Runtime Error):
num=input().split()
a=int(num[0])
b=int(num[1])
if a!=0&&b!=0:
  print(max([a+b,a-b,a*b]))
else:
  print(max([a+b,a-b,a*b,a/b]))

Buggy submission (verdict: Runtime Error):
num=input().split()
a=int(num[0])
b=int(num[1])
if a==b:
  print(max([a+b,a-b,a*b]))
else:
  print(max([a+b,a-b,a*b,a/b]))

Buggy submission (verdict: Runtime Error):
num=input().split()
a=int(num[0])
b=int(num[1])
if a!=b:
  print(max([a+b,a-b,a*b]))
else:
  print(max([a+b,a-b,a*b,a/b]))

Buggy submission (verdict: Runtime Error):
num=input().split()
a=int(num[0])
b=int(num[1])
print(max([a+b,a-b,a*b,a/b]))

Buggy submission (verdict: Runtime Error):
num=input().split()
a=int(num[0])
b=int(num[1])
print(max[a+b,a-b,a*b,a/b])
Problem p02694 (python)

Fixed submission:
x=int(input())
ans=0
cost=100
while(cost<x):
    cost=cost*101//100
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
x=int(input())
cost=100
while(cost<x):
    cost=cost*101//100
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
x=int(input())
cost=100
while(cost<x):
    cost*=101
    cost//=100
    ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
x=int(input())
cost=100
while(cost<x):
    cost*=101
    cost=//100
    ans+=1
print(ans)
Problem p02817 (python)

Fixed submission:
s,t=input().split()
print(t+s)

Buggy submission (verdict: Runtime Error):
s,t=map(input().split())
print(s+t)
Problem p02898 (python)

Fixed submission:
n,k=map(int,input().split())
h=list(map(int,input().split()))
ans=0
for i in h:
    if i>=k:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
h=list(map(int,input().split()))
ans=0
for i in h:
    if h>=k:
        ans+=1
print(ans)
Problem p02921 (python)

Fixed submission:
s=input()
t=input()
ans=0
for i in range(3):
    if s[i]==t[i]:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
s,t=input().split()
ans=0
for i in range(3):
    if s[i]==t[i]:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
s,t=input().split()
ans=0
for i range(3):
    if s[i]==t[i]:
        ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
c1=input()[0]
c2=input()[1]
c3=input()[2]
print(c1+c2+c3)
Problem p02922 (python)

Fixed submission:
import math 
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
ans,num=0,1:
while num<b:
    num-=1
    num+=a
    ans+=1
print(ans)
Problem p02946 (python)

Fixed submission:
k,y=map(int,input().split())
for i in range(y-k+1,k+y):
    print(i,end=" ")

Buggy submission (verdict: Runtime Error):
k,y=map(int,input().split())
for i in range(x-y+1,x+y):
    print(i,end=" ")

Buggy submission (verdict: Runtime Error):
k,y=map(int,input().split())
for i in range(x-y+1,x+y):
    print(i,end=" ")

Buggy submission (verdict: Runtime Error):
k,y=map(int,input().split())
for i in range(x-y,x+y):
    print(i)
Problem p03447 (python)

Fixed submission:
import math
x,a,b=[int(input()) for i in range(3)]
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
import math
x,a,b=[int(input()) for i int range(3)]
print((x-a)%b)

Buggy submission (verdict: Runtime Error):
import math
x,a,b=map(int,input().split())
print((x-a)%b)