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

Fixed submission:
pronunciation = {0: 'pon', 1: 'pon', 2: 'hon', 3: 'bon', 4: 'hon', 5: 'hon', 6: 'pon', 7: 'hon', 8: 'pon', 9: 'hon'}
input = input()
if len(input) > 1:
  input = int(input[-1])
if type(input) != int:
    input = int(input)
print(pronunciation[input])

Buggy submission (verdict: Runtime Error):
pronunciation = {0: 'pon', 1: 'pon', 2: 'hon', 3: 'bon', 4: 'hon', 5: 'hon', 6: 'pon', 7: 'hon', 8: 'pon', 9: 'hon'}
input = input()
if len(input) > 1:
  input = int(input[-1])
print(pronunciation[input])

Buggy submission (verdict: Runtime Error):
pronunciation = {0: 'pon', 1: 'pon', 2: 'hon', 3: 'bon', 4: 'hon', 5: 'hon', 6: 'pon', 7: 'hon', 8: 'pon', 9: 'hon'}
input = int(input())
print(pronunciation[input])
Problem p02675 (python)

Fixed submission:
N = int(input())
r = N % 10
if r == 2 or r==4 or r==5 or r==7 or r==9:
  print('hon')
elif r == 0 or r == 1 or r == 6 or r == 8:
  print('pon')
else:
  print('bon')

Buggy submission (verdict: Runtime Error):
N = input()
r = N%10
if r == 2 or r==4 or r==5 or r==7 or r==9:
  print('hon')
elif r == 0 or r == 1 or r == 6 or r == 8:
  print('pon')
else:
  print('bon')
Problem p02675 (python)

Fixed submission:
N=input()
if N[-1] == "3":
  print("bon")
elif int(N[-1]) in [2,4,5,7,9]:
  print("hon")
else:
  print("pon")

Buggy submission (verdict: Runtime Error):
N=input()
if N[-1] == "3":
  return "bon"

Buggy submission (verdict: Runtime Error):
N
Problem p03697 (python)

Fixed submission:
a, b = map(int, input().split())
if(a+b<10):
    print(a+b)
else:
    print("error")

Buggy submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
if(a+b<11):
    print(a+b)
else:
    print("error")
Problem p03698 (python)

Fixed submission:
s = str(input())
f = "yes"
for i in range(0,len(s)):
    if s.count(s[i]) != 1:
        f = "no"
        break
print(f)

Buggy submission (verdict: Runtime Error):
s = str(input())
f = "yes"
for i in range(0,len(s)):
    if s.count(i) != 1:
        f = "no"
        break
print(f)
Problem p03284 (python)

Fixed submission:
#!/usr/bin/env python3

[N, K] = [int(x) for x in input().split(" ")]
print(0 if (N % K == 0) else 1)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

[N, M] = [int(x) for x in input().split(" ")]
A = [int(x) for x in input().split(" ")]

ret = 0
for l in range(0, N):
    Sum = 0
    for r in range(l, N):
        Sum += A[r]
        if Sum % M == 0:
            ret += 1
print(ret)
Problem p03573 (python)

Fixed submission:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

(A, B, C) = [int(x) for x in input().split(" ")]

if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

(A, B, C) = [int(x) for x in raw_input().split(" ")]

if A == B:
    print(C)
elif A == C:
    print(B)
else:
    print(A)
Problem p03031 (python)

Fixed submission:
import itertools
N,M=map(int,input().split())
kslist=[(list(map(int,input().split()))) for i in range(M)]
plist=list(map(int,input().split()))
ls=list((itertools.product(range(2),repeat=N)))
n=0
for tup in ls:
    n+=1
    for j in range(M):
        sum1=0
        for k in range(1,kslist[j][0]+1):
            sum1+=tup[kslist[j][k]-1]
        if sum1%2!=plist[j]:
            n=n-1
            break
print(n)

Buggy submission (verdict: Runtime Error):
import itertools
N,M=map(int,input().split())
kslist=[(list(map(int,input().split()))) for i in range(M)]
plist=list(map(int,input().split()))
ls=list((itertools.product(range(2),repeat=N)))
n=0
for tup in ls:
    if [tup[kslist[j][k in range(1,kslist[j][0]+1)]-1]%2 for j in range(M)]==plist:
        n+=1
print(n)

Buggy submission (verdict: Runtime Error):
import itertools
N,M=map(int,input().split())
kslist=[(list(map(int,input().split()))) for i in range(M)]
plist=list(map(int,input().split()))
ls=list((itertools.product(range(2),repeat=N)))
n=0
for tup in ls:
    if [tup[kslist[j][k in range(1,kslist[j][0]+1)]-1]%2 for j in range(M)]==plist:
        n+=1
print(n)

Buggy submission (verdict: Runtime Error):
import itertools
N,M=map(int,input().split())
kslist=[]
for i in range(M):
    kslist.append(list(map(int,input().split()))) 
plist=list(map(int,input().split()))
ls=list((itertools.product(range(2),repeat=N)))
n=0
for tup in ls:
    if [tup[kslist[j][k in range(1,kslist[j][0]+1)]-1]%2 for j in range(M)]==plist:
        n+=1
print(n)

Buggy submission (verdict: Runtime Error):
import itertools
N,M=map(int,input().split())
kslist=[]
for i in range(M):
    kslist.append(list(map(int,input().split()))) 
plist=list(map(int,input().split()))
seq=[0]*N+[1]*N
ls=list(set(list(itertools.permutations(seq,N))))
n=0
for tup in ls:
    if [tup[kslist[j][k in range(1,kslist[j][0]+1)]-1]%2 for j in range(M)]==plist:
        n+=1
print(n)

Buggy submission (verdict: Runtime Error):
import itertools
N,M=map(int,input().split())
kslist=[]
for i in range(M):
    kslist.append(list(map(int,input().split()))) 
plist=list(map(int,input().split()))
seq=[0]*N+[1]*N
ls=list(set(list(itertools.permutations(seq,N))))
n=0
for tup in ls:
    ln=[]
    for j in range(M):
        sum1=0
        sum1+=tup[kslist[j][k in range(1,kslist[j][0]+1)]-1]
        ln.append(sum1%2)
    if ln==plist:
        n+=1
        
print(n)
Problem p02675 (python)

Fixed submission:
N = int(input())
N = N % 10
if N in [2, 4, 5, 7, 9]:
    print('hon')

elif N in [0, 1, 6, 8]:
    print('pon')

else:
    print('bon')

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[0:K]　+ "...")

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[0:K]　+ '...')

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else
    print(S[0:K]　+ '...')

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())

if len(S) <= K:
    print(S)
else
    print(S[0:K]　+ '...')

Buggy submission (verdict: Runtime Error):
S = input()
K = int(input())

if len(S) <= K:
    print(S)
else
    S = S[0:K]　+ '...'
    print(S)

Buggy submission (verdict: Runtime Error):
N = input()
N = N % 10
if N in [2, 4, 5, 7, 9]:
    print('hon')

elif N in [0, 1, 6, 8]:
    print('pon')

else:
    print('bon')

Buggy submission (verdict: Runtime Error):
N = int(input(N))
N = N % 10
if N in 2, 4, 5, 7, 9:
    print('hon')

elif N in 0, 1, 6, 8:
    print('pon')

else:
    print('bon')

Buggy submission (verdict: Runtime Error):
N = input(N)
N = N % 10
if N in 2, 4, 5, 7, 9:
    print('hon')

elif N in 0, 1, 6, 8:
    print('pon')

else:
    print('bon')

Buggy submission (verdict: Runtime Error):
N = input(N)
N = N % 10
if(N == 2, 4, 5, 7, 9):
    print('hon')

elif(N == 0, 1, 6, 8):
    print('pon')

else:
    print('bon')
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 = input() 
t = input()

ans = 0

for i in range(3):
	if s[i]=t[i]:
		ans += ans

print(ans)

Buggy submission (verdict: Runtime Error):
s = input() 
t = input()

ans = 0

for i in range(3){
	if s[i]=t[i]
		ans += ans

print(ans)
Problem p02922 (python)

Fixed submission:
a,b = map(int, input().split())
sum = 1
result = 0
while sum < b:
     sum = sum -1 + a
     result += 1

print(result)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
sum = 1
result = 0
while sum < b:
     sum = sum -1 + a
     result += 1

print(result)
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):
n=int(input())
print(n*(n-1)//2)
Problem p02969 (python)

Fixed submission:
print(3*(int(input())**2))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(input()) for i in range(n)]
b=sorted(a,reverse=True)
x,y=b[0],b[1]
z=a.index(x)
for i in range(n):
	if i==z:
		print(y)
	else:
		print(x)
Problem p03145 (python)

Fixed submission:
x,y,z=map(int,input().split())

ans=x*y/2

print('{:.0f}'.format(ans))

Buggy submission (verdict: Runtime Error):
x,y,z=map(int,input().split())

ans=x*y/2

print(int(k))
Problem p03325 (python)

Fixed submission:
n=int(input())
la=[int(i) for i in input().split()]
ans=0

for i in range(n):
    while la[i]%2==0:
        la[i]=la[i]/2
        ans+=1

print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
la=[int(i) for i in input().split()]
la.sort(reverse=True)
ans=-1
t3=0

while t3!=n:
    f=0
    t3=0
    for i in range(n):
        if f==0 and la[i]%2==0:
            la[i]=la[i]/2
            f=1
        else:
            la[i]=la[i]*3
            t3+=1
    ans+=1

print(ans)
Problem p02677 (python)

Fixed submission:
import math

(a, b, h, m) = tuple(map(int, input().split()))
minutes = h * 60 + m
h_deg = (minutes  / (12 * 60)) * 2 * math.pi
m_deg = (minutes  / 60) * 2 * math.pi
h_x = a * math.cos(h_deg)
h_y = a * math.sin(h_deg)
m_x = b * math.cos(m_deg)
m_y = b * math.sin(m_deg)
print(math.sqrt((h_x - m_x) * (h_x - m_x) + (h_y - m_y) * (h_y - m_y)))

Buggy submission (verdict: Runtime Error):
h_deg = (minutes  / (12 * 60)) * 2 * math.pi
m_deg = (minutes  / 60) * 2 * math.pi
h_x = a * math.cos(h_deg)
h_y = a * math.sin(h_deg)
m_x = b * math.cos(m_deg)
m_y = b * math.sin(m_deg)
print(math.sqrt((h_x - m_x) * (h_x - m_x) + (h_y - m_y) * (h_y - m_y)))
Problem p02675 (python)

Fixed submission:
N=list(map(int,input()))
if N[-1]==3:
    print("bon")
elif N[-1]==2 or N[-1]==4 or N[-1]==5 or N[-1]==7 or N[-1]==9:
    print("hon")
else:
    print("pon")

Buggy submission (verdict: Runtime Error):
import math
A,B,H,M=map(int,input().split())
H=5*H+5*M/60
theta=6*abs(H-M) 
if theta>180:
    theta=360-theta
C=math.sqrt(A**2+B**2-2*A*B*(math.cos(math.radians(theta))))
print(C)
Problem p02677 (python)

Fixed submission:
import math

a,b,h,m = map(int,input().split())

c = (h * 60 * 0.5) + (m * 0.5)
d = m * 6

if c > d:
  e = c - d
else:
  e = d - c

ans = (a * a) + (b * b) - 2 * a * b * math.cos(math.radians(e))
print(math.sqrt(ans))

Buggy submission (verdict: Runtime Error):
import math

a,b,h,m = map(int,input().split())

flg = 0
if h > 6:
  flg += 1
  x = 12 - h
  h = 6 - x

if m > 30:
  flg += 2
  mm = m -30

if flg == 1:
  mm = m + 30

if flg == 2:
  h += 6

c = (h * 60 * 0.5) + (m * 0.5)
d = mm * 6

if c > d:
  e = c - d
else:
  e = d - c

if e == 0:
  print(0.0)
else:
  ans = (a * a) + (b * b) - 2 * a * b * math.cos(math.radians(e))
  print(math.sqrt(ans))

Buggy submission (verdict: Runtime Error):
import math

a,b,h,m = map(int,input().split())

if h > 6:
  x = 12 - h
  h = 6 - x

if m > 30:
  mm = m -30

c = (h * 60 * 0.5) + (m * 0.5)
d = mm * 6

if c > mm:
  e = c - d
else:
  e = d - c

ans = (a * a) + (b * b) - 2 * a * b * math.cos(math.radians(e))
print(math.sqrt(ans))

Buggy submission (verdict: Runtime Error):
import math

a,b,h,m = map(int,input().split())

if h > 6:
  x = 12 - h
  h = 6 - x

if m > 30:
  mm = m -30

c = (h * 60 * 0.5) + (m * 0.5)
d = mm * 6

if c > mm:
  e = c - d
else:
  e = d - c

ans = (a * a) + (b * b) - 2 * a * b * math.cos(math.radians(e))
print(math.sqrt(ans))
Problem p02952 (python)

Fixed submission:
n = input()
i = int(n)
cnt = 0
ans = 0
while i >= 1:
  i = int(i) / 10
  cnt = int(cnt) + 1
if int(cnt) % 2 == 0:
  i = cnt / 2
  if i == 3:
      ans = 90000 + 900 + 9
  elif i == 2:
      ans = 900 + 9
  else :
      ans = 9
else :
  i = (int(cnt) / 2) + 1
  if i >= 3:
    ans = 9 + 900 + (int(n) - 10000) + 1
  elif i >= 2:
    ans = 9 + (int(n) - 100) + 1
  else :
    ans = int(n)
print(ans)

Buggy submission (verdict: Runtime Error):
n = input()
i = int(n)
cnt = 0
ans = 0
while i > 0:
  i /= 10
  cnt++
if cnt / 2 == 0:
  i = cnt / 2
  if i == 3:
      ans = 90000 + 900 + 9
  elif i == 2:
      ans = 900 + 9
  else :
      ans = 9
else :
  i = (cnt / 2) + 1
  if i == 3:
    ans = 9 + 900 + (int(n) - 10000) + 1
  elif i == 2:
    ans = 9 + (int(n) - 100) + 1
  else :
    ans = int(n)
print(ans)

Buggy submission (verdict: Runtime Error):
n = map(int, input())
i = n
cnt = 0
ans = 0
while i > 0:
  i /= 10
  cnt++
  
if cnt / 2 == 0:
  i = cnt / 2
  if i == 3:
      ans = 90000 + 900 + 9
  elif i == 2:
      ans = 900 + 9
  else :
      ans = 9
  
else :
  i = (cnt / 2) + 1
  if i == 3:
    ans = 9 + 900 + (n - 10000) + 1
  elif i == 2:
    ans = 9 + (n - 100) + 1
  else :
    ans = n

print(ans)
Problem p02957 (python)

Fixed submission:
a, b = map(int, input().split())
if (a + b) % 2 == 0 :
  print((a + b) // 2)
else :
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().splid())
if (a + b) % 2 == 0 :
  print((a + b) / 2)
else :
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a + b) % 2 == 0 :
  print((a + b) / 2)
else
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().splid())
if (a + b) % 2 == 0 :
  print((a + b) / 2)
else
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().solid())
if (a + b) % 2 == 0 :
  print((a + b) % 2)
else
  print("IMPOSSIBLE")
Problem p02958 (python)

Fixed submission:
cnt = 0
n = int(input())
p = list(map(int, input().split()))
for i in range(1, n + 1):
  if int(i) != p[i - 1] :
    cnt += 1
    if cnt >= 3:
      break
if cnt <= 2 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
p = list(map(int, input().split())
for i in range(n):
  if int(i) + 1 != p[i] :
    cnt += 1
    if cnt >= 3:
      break
if cnt <= 2 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
p = list(map(int, input().split())
for i in range(1, n + 1):
  if int(i) != p[i - 1] :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
for i in range(1, n + 1):
  p = int(input())
  if int(i) != p :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
for i int range(1, n + 1):
  p = int(input())
  if int(i) != p :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
for i int rangr(1, n + 1):
  p = int(input())
  if int(i) != p :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
for i int rangr(1, n + 1):
  p = map(int, input().split())
  if int(i) != p :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
for i int rangr(1, n + 1):
  p = map(int, input().split()
  if int(i) != p :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO")

Buggy submission (verdict: Runtime Error):
cnt = 0
n = int(input())
for i int rangr(1, n + 1):
  p = map(int, input().split()
  if int(i) != p :
    cnt += 1
    if cnt >= 2:
      break
if cnt <= 1 :
  print("YES")
else :
   print("NO)
Problem p02969 (python)

Fixed submission:
r = int(input())
print(3 * r * r)

Buggy submission (verdict: Runtime Error):
n, d = map(int, input().split())
i = (d * 2) + 1
if n % i == 0 :
  print(n / i)
else :
  print((n // i) + 1)
Problem p02981 (python)

Fixed submission:
n, a, b = (int(x) for x in input().split())
sum = n * a
if sum <= b :
  print(sum)
else :
  print(b)

Buggy submission (verdict: Runtime Error):
n, a, b = (int(x) for x in input().splint())
sum = n * a
if sum <= b :
  print(sum)
else :
  print(b)
Problem p02982 (python)

Fixed submission:
n, d = (int(i) for i in input().split())
num = list((list(map(int, input().split())) for j in range(n)))
sum = 0
cnt = 0
for k in range(n - 1) :
  for t in range(k + 1, n) :
    for h in range(d) :
      sum += (num[k][h] - num[t][h])**2
    work = sum**(1 / 2)
    temp = work * 10
    temp = temp % 10
    if temp == 0 :
      cnt += 1
    sum = 0
print(cnt)

Buggy submission (verdict: Runtime Error):
n, d = (int(i) for i in input().split())
num = list((list(map(int, input().split())) for j in rage(n)))
sum = 0
cnt = 0
for k in range(n - 1) :
  for h in range(d) :
    sum += (num[k][h] - num[k + 1][n])**2
  if (isinstance(sum **(1 / 2)), int) :
    cnt += 1
  sum = 0
print(sum)
Problem p02988 (python)

Fixed submission:
n = int(input())
num = list(map(int, input().split()))
cnt = 0
for i in range(1, n - 1) :
  if num[i - 1] > num[i] & num[i] > num[i + 1] :
    cnt += 1
  elif num[i - 1] < num[i] & num[i] < num[i + 1] :
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
num = list(map(int, input().split()))
cnt = 0
for i in range(1, n) :
  if num[i - 1] > num[i] & num[i] > num[i + 1] :
    cnt += 1
  elif num[i - 1] < num[i] & num[i] < num[i + 1] :
    cnt += 1
print(cnt)
Problem p02993 (python)

Fixed submission:
s = list(map(int, input()))
flg = 1
for i in range(4) :
  if i != 0 :
    if s[i -1] == s[i] :
      flg = 0
if flg == 1 :
  print("Good")
else :
  print("Bad")

Buggy submission (verdict: Runtime Error):
s = list(map(int, input().solit()))
flg = 1
for i in range(4) :
  if i != 0 & s[i -1] == s[i] :
    flg = 0
if flg == 1 :
  print("Good")
else :
  print("Bad")
Problem p02994 (python)

Fixed submission:
n, l = (int(i) for i in input().split())
ans = 0
flg = 0
temp = 1000
for i in range(n) :
  sum =  l + (i + 1) - 1
  if sum == 0 :
    flg = 1
  elif temp > abs(sum) :
    temp = abs(sum)
    min = sum
  ans += sum
if flg == 1 :
  print(ans)
else :
  print(ans - min)

Buggy submission (verdict: Runtime Error):
n, l = (int(i) for i in input().solit())
ans = 0
flg = 0
min = 1000
for i in range(n) :
  sum =  l + (i + 1) - 1
  if sum == 0 :
    flg = 1
  elif min > sum :
    min = sum
  ans += sum
if flg == 1 :
  print(ans)
else :
  print(ans - sum)
Problem p02678 (python)

Fixed submission:
import collections

n,m=map(int,input().split())
g=[[] for _ in range(n+1)]
for _ in range(m):
 a,b=map(int,input().split())
 g[a].append(b)
 g[b].append(a)
q=collections.deque()
q.append(1)
check=[0]*(n+1)
check[1]=1
ans=[0]*(n+1)
while len(q)!=0:
 v=q.popleft()
 for u in g[v]:
   if check[u]==0:
     check[u]=1
     ans[u]=v
     q.append(u)
print('Yes')
for i in range(2,n+1):
 print(ans[i])

Buggy submission (verdict: Runtime Error):
import sys
from collections import deque
def input():
    return list(map(int, sys.stdin.readline().strip().split()))

n, m = input()
mem = [0 for _ in range(n + 1)] # n -> 1 거리
adj = [set() for _ in range(n + 1)]
q = []

for i in range(m):
    a, b = input()
    adj[b].append(a)
    adj[a].append(b)
    if b == 1: 
        q.append(a)
        mem[a] = 1
    if a == 1: 
        q.append(b)
        mem[b] = 1

visited = []
while q:
    v = q.pop(0)
    if v not in visited:
        visited.append(v)
        for node in adj[v]:
            if node not in visited:
                mem[node] = mem[v] + 1
                q.append(n)

if 0 in mem: print('No')
else: print('Yes', *mem[2:], sep='\n')
Problem p02690 (python)

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

Buggy submission (verdict: Runtime Error):
x = int(input())
power5 = [(i ** 5) for i in range(100)]
for i in range(100):
  for j in range(100):
    if power[i] - power5[j] == x:
      print(i, j)
      exit()
for i in range(100):
  for j in range(100):
    if power5[i] + power5[j] == x:
      print(i, -j)
      exit()
for i in range(100):
  for j in range(100):
    if -power5[i] + power5[j] == x:
      print(-i, -j)
      exit()
Problem p02706 (python)

Fixed submission:
n, m = list(map(int, input().split()))
print(max(n - sum(list(map(int, input().split()))), -1))

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split())
print(max(n - sum(list(map(int, input().split()))), 0))

Buggy submission (verdict: Runtime Error):
n, m = list(map(int, input().split())
print(max(n - sum(list(map(int, input().split()), 0))
Problem p02945 (python)

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

Buggy submission (verdict: Runtime Error):
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])

print(max(a+b, a-b, a*b))

Buggy submission (verdict: Runtime Error):
a = sys.argv[0]
b = sys.argv[1]

print(max(a+b, a-b, a*b))
Problem p02683 (python)

Fixed submission:
n, m, x = map(int, input().split())
l = [list(map(int, input().split())) for i in range(n)]
bi_list = [bin(i)[2:] for i in range(2**n)] 
comb = [0] * (m+1)
comb[0] = 10**7
for i in bi_list:#本の選択パターン選択
    dig = len(i) 
    state = [0] * (m+1)
    for j in range(dig):#iから本の選択
        if i[dig-1-j] == '1':
            for k in range(m+1):#本の数値入力
                state[k] += l[n-1-j][k]
    for p in range(m):
        if state[m - p] < x:
            break
    else:
        if state[0] < comb[0]:
            comb = state
if comb[m] == 0:
    print(-1)
else:
    print(comb[0])

Buggy submission (verdict: Runtime Error):
#Cbit全探索
n, m, x = map(int, input().split())
books = [list(map(int, input().split())) for i in range(n)]
ans = [0]*(m+1); ans[0] = 10**7  
for i in range(2**n):
    state = [0]*(m+1)
    for j in range(n):
        if (i >> j) & 1:
             for k in range(m+1):
                state[k] += books[m-1-j][k]
    for j in range(1,m+1):
        if state[j] < x:
            break
    else:
        if ans[0] >= state[0]:
            ans = state
if ans[0] == 10**7:
	print(-1)
else:
  print(ans[0])

Buggy submission (verdict: Runtime Error):
#Cbit全探索
n, m, x = map(int, input().split())
books = [list(map(int, input().split())) for i in range(n)]
ans = [0]*(m+1); ans[0] = 10**7  
for i in range(2**n):
    state = [0]*(m+1)
    for j in range(n):
        if (i >> j) & 1:
             for k in range(m+1):
                state[k] += books[m-1-j][k]
    for j in range(1,m+1):
        if state[j] < x:
            break
    else:
        if ans[0] >= state[0]:
            ans = state
if ans[0] == 10**7:
	print(-1)
else:
  print(ans[0])

Buggy submission (verdict: Runtime Error):
n, m, x = map(int, input().split())
l = [list(map(int, input().split())) for i in range(n)]
bi_list = [bin(i) for i in range(2**n)] 
comb = [0] * (m+1)
comb[0] = 10**6
for i in bi_list:#本の選択パターン選択
    dig = len(i)
    state = [0] * (m+1)
    for j in range(dig):#iから本の選択
        if i[n-1-j] == '1':
            for k in range(m+1):#本の数値入力
                state[k] += l[n-1-j][k]
                
    for p in range(m):
        if state[m - p] < x:
            break
    else:
        if state[0] < comb[0]:
            comb = state
if comb[m] ==0:
    print(-1)
else:
    print(comb[0])