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

Fixed submission:
s = input()
if s == 'ABC':
    print('ARC')
else:
    print('ABC')

Buggy submission (verdict: Runtime Error):
s = input()
if s == 'ABC'
	print('ARC')
else:
	print('ABC')
Problem p03061 (python)

Fixed submission:
from fractions import gcd
N=int(input())
A=list(map(int,input().split()))
tA=list(reversed(A))
l=[0]
r=[0]
m=[]
for i in range(N):
  tmpl = l[i]
  tmpa = A[i]
  tmpta = tA[i]
  l.append(gcd(l[i],A[i]))
  r.append(gcd(r[i],tA[i]))
r=list(reversed(r))
for i in range(N):
  m.append(gcd(l[i],r[i+1]))
print(max(m))

Buggy submission (verdict: Runtime Error):
n = int(input())
v = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

v.sort()
c.sort()

maximum = 0
profit = []
for i in range(len(v)):
    tmp = v[i] - c[i]
    if tmp > 0:
        maximum += tmp
    tmp = 0

print(maximum)
Problem p03106 (python)

Fixed submission:
a, b, k = map(int, input().split())
div = []
for i in range(1, 105):
    if (a % i == 0) and (b % i == 0):
        div.append(i)

if len(div) < k: 
    print(max(div))
else:
    div.sort()
    print(div[-k])

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
div = []
for i in range(1, max(a, b)):
    if (a % i == 0) and (b % i == 0):
        div.append(i)
if len(div) == 0:
    print(1)
else:
    div.sort()
    print(div[-k])

Buggy submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
div = []
for i in range(1, max(a, b)):
    if (a % i == 0) and (b % i == 0):
        div.append(i)
if a == 1 and b == 1:
    print(1)
else:
    div.sort()
    print(div[-k])
Problem p02675 (python)

Fixed submission:
N = int(input())
N%=10
if N == 3:
    print("bon")
elif N == 0 or N == 1 or N == 6 or N == 8:
    print("pon")
else:
    print("hon")

Buggy submission (verdict: Runtime Error):
N = int(input())
N%=10
if N == 3:
    print("bon")
elif N == 0 or N == 1 or N == 6 N == 8:
    print("pon")
else:
    print("hon")
Problem p02717 (python)

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(str(X)+" "+str(Y)+" "+str(Z))

Buggy submission (verdict: Runtime Error):
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(f"{X} {Y} {Z}")
Problem p02731 (python)

Fixed submission:
L=float(input())
print((L/3)**3)

Buggy submission (verdict: Runtime Error):
L=int(input())
print(f"{(L/3)**3:.6f}")
Problem p02657 (python)

Fixed submission:
a,b = [int(i) for i in input().split()]
print(a*b)

Buggy submission (verdict: Runtime Error):
import math

R = int(input())
print(2 * R * math.pi)
Problem p03573 (python)

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

if a == b:
    print(c)
elif a == c:
    print(b) 
else:
    print(a)

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

if a == b:
    print(c)
elif a == c:
    print(b) 
else:
    print(a)

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

if a == b:
    print(c)
elif a == c:
    print(b) 
else:
    print(a)
Problem p03635 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
print(2 * n,end = "\n")
Problem p02576 (python)

Fixed submission:
N, X, T = map(int, input().split())
temp = 0
while (N > 0):
    N = N - X
    temp += 1
print(T*temp)

Buggy submission (verdict: Runtime Error):
N = int(input())
X = int(input())
T = int(input())
temp = 0
while (N > 0):
    N = N - X
    temp += 1
print(T*temp)
Problem p02582 (python)

Fixed submission:
S = input()
print(max(map(len, S.split('S'))))

Buggy submission (verdict: Runtime Error):
S = raw_input()
print(max(map(len, S.split('S'))))

Buggy submission (verdict: Runtime Error):
S = input()
A = split(S)
count = 0
for i in range(len(S)):
  if(S[i] == 'R'):
    count += 1
print(count)
Problem p02700 (python)

Fixed submission:
A, B, C, D = map(int, input().split())
while (A>0 and C > 0):
    C = C - B
    if C <= 0:
        break
    A = A - D
print("Yes" if C<=0 else "No")

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, input()split())
while (a>0 and c>0):
  c = c - b 
  if c <= 0:
    break
  a = a - d
print("Yes" if c <= 0 else "No")
Problem p02765 (python)

Fixed submission:
N, R = map(int, input().split())
if N >= 10:
  print(R)
else:
  print( 100 * (10 - N) + R )

Buggy submission (verdict: Runtime Error):
N, R = int(input())
if N >= 10:
  print(R)
else: 
  print ( 100 * (10 - R) + N)

Buggy submission (verdict: Runtime Error):

def hello():
    N = int(input()) 
    R = int(input())
    if N >= 10: 
        print R 
    else: 
        print 100 * ( 10 - N ) + R
hello()

Buggy submission (verdict: Runtime Error):
N = int(input())
R = int(input())
if N >= 10: 
  return R 
else: 
  return 100 * ( 10 - N ) + R
Problem p02767 (python)

Fixed submission:
N = int(input())
X = list(map(int, input().split()))
M = round(sum(X)/N)
ans = 0
for i in X:
    ans+=(i-M)**2
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
total = 0 
X = list( input().split())
for i in X: 
    total +=  (X[i] - N) * (X[i] - N)
print(total)
Problem p02811 (python)

Fixed submission:
[K, X] = [int(x) for x in input().split()]
if K * 500 >= X:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
numOfK = input()
numOfN = input()

if numOfK * 500 > numOfN:
  print("Yes")
else:
  print("No")
Problem p02817 (python)

Fixed submission:
string = input().split()
print(string[1]+string[0])

Buggy submission (verdict: Runtime Error):
str = inpit().split()
print(str[1]+str=[0])
Problem p02731 (python)

Fixed submission:
N = int(input())

print((N/3)**3)

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

print(round((N/3)**3, '.15f'))

Buggy submission (verdict: Runtime Error):
from decimal import *
N = input()

# print(Decimal(N) // Decimal(3))
print(N**3 // 27)
Problem p02813 (python)

Fixed submission:
import itertools

n = int(input())

p_list = [int(i) for i in input().split()]
q_list = [int(i) for i in input().split()]

num_list = [i+1 for i in range(n)]

a = 0
b = 0

for i, v in enumerate(itertools.permutations(num_list, n)): 
    if(list(v) == p_list):
        a = i
    if(list(v) == q_list):
        b = i
print(abs(a - b))

Buggy submission (verdict: Runtime Error):
import itertools

n = input()

p_list = list(int, input().split())
q_list = list(int, input().split())

num_list = [i+1 for i in range(n)]

a = 0
b = 0

for i, v in enumerate(itertools.permutations(num_list, n)): 
    print(v) 
    if(list(v) == p_list):
        a = i
    if(list(v) == q_list):
        b = i
print(abs(a - b))
Problem p02640 (python)

Fixed submission:
a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  ans = turu + kame
  if ans == b:
    print('Yes')
    break
  i = i + 1
  
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  
  if b == turu:
    print('YES')
    
  if b == kame:
    print('YES')
  
  amari = b - turu
  if amari == 0:
    print('YES')
    break

  if kame !=0:
    if amari % kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
i = 0
while i<a:
  turu = 2*(a-i)
  kame = 4*i
  
  amari = b % turu
  if amari == 0:
    print('YES')
    break

  if kame !=0:
    if amari % kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No)
Problem p02641 (python)

Fixed submission:
x,n = map(int, input().split())
if n ==0:
  print(x)
if n != 0:
  i = list(map(int, input().split()))


  
  if x not in i:
    print(x)
  
  else:
    p = 1
    while True:
      z = x - p
      if z not in i:
        print(z)
        break
        
      z = x + p
      if z not in i:
        print(z)
        break
        
      p = p +1

Buggy submission (verdict: Runtime Error):
x,n = map(int, input().split())
if n ==0:
  print(x)
if n != 0:
  i = list(map(int, input().split()))


  
if x not in i:
  print(x)
  break
  
else:
  p = 1
  while True:
    z = x - p
    if z not in i:
      print(z)
      break
        
    z = x + p
    if z not in i:
      print(z)
      break
        
    p = p +1

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

if n ==0:
  print(x)
  
if x not in i:
  print(x)
  
  else:
    p = 1
    while True:
      z = x - p
      if z not in i:
        print(z)
        break
        
      z = x + p
      if z not in i:
        print(z)
        break
        
      p = p +1

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

if n ==0:
  print(x)
  
if x not in i:
  print(x)
  
  else:
    p = 1
    while True:
      z = x - p
      if z not in i:
        print(z)
        break
        
      z = x + p
      if z not in i:
        print(z)
        break
        
      p = p +1

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

if n ==0:
  print(x)
  
if x not in i:
  print(x)
  
  else:
    p = 1
    while True:
      z = x - p
      if z not in i:
        print(z)
        break
        
      z = x + p
      if z not in i:
        print(z)
        break
        
      p = p +1
Problem p02717 (python)

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

A,C = C,A
print(A,B,C)

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

A,B = B,C
A,C = C,A

print(A,B,C)

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

A_b = B
B_a = A

A_c = C
C_a = A_b
print(A_c,B_a,C_a)
Problem p02988 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys

n = int(input())
s = [int(c) for c in input().split(' ')]

count = 0

for i in range(n-2):
    if s[i] < s[i+1] < s[i+2] or s[i] > s[i+1] > s[i+2]:
        count += 1

print(count)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys

n = int(input())
s = [int(c) for c in input()]

count = 0

for i in range(n-2):
    if s[i] < s[i+1] < s[i+2] or s[i] > s[i+1] > s[i+2]:
        count += 1

print(count)
Problem p03037 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import sys

s = (input().split(' '))

n,m = [int(i) for i in s]

l_list = []
r_list = []

for i in range(m):
    s = (input().split(' '))
    l,r = [int(i) for i in s]
    l_list.append(l)
    r_list.append(r)

range = (max(l_list), min(r_list))

if range[0] > range[1]:
    print(0)
else:
    print(range[1] - range[0] + 1)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys

s = (input().split(' '))

n,m = [int(i) for i in s]

l_list = []
r_list = []

for i in range(m):
    s = (input().split(' '))
    l,r = [int(i) for i in s]
    l_list.append(l)
    r_list.append(r)

range = (max(l_list), min(r_list))

if range[0] > range[1]:
    print(0)
else:
    print(range[1] - range[0] + 1))
Problem p03023 (python)

Fixed submission:
print(180*(int(input())-2))

Buggy submission (verdict: Runtime Error):
print(180*(Nint(input())))
Problem p03308 (python)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
print(max(a) - min(a))

Buggy submission (verdict: Runtime Error):
N = int(input())
a = np.array(list(map(int, input().split())))
print(max(a) - min(a))
Problem p02717 (python)

Fixed submission:
X, Y, Z = map(int, input().split())
print(Z, X, Y)

Buggy submission (verdict: Runtime Error):
X, Y, Z = int(input())
X, Z = Z, X
print(X, Y, Z)
Problem p02731 (python)

Fixed submission:
L = int(input())

num = L // 3
rem = L % 3

if rem == 1:
    res = (num+1)*(num**2)

elif rem == 2:
    res = ((num + 1) ** 2) * num

else:
    res = num ** 3

res2 = (L/3)**3
if res > res2:
    print(res)
else:
    print(res2)

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

num = L // 3
rem = x % 3

if rem == 1:
    res = (num+1)*(num**2)

elif rem == 2:
    res = ((num + 1) ** 2) * num

else:
    res = num ** 3

res2 = (x/3)**3
if res > res2:
    print(res)
else:
    print(res2)
Problem p02761 (python)

Fixed submission:
n, m = map(int, input().split())
lst = [x for x in range(n)]
dic = {}
not_found = False
special_case = False
for i in range(m):
    a, b = map(int, input().split())
    if str(a) not in list(dic.keys()):
        dic[str(a)] = b
    else:
        if dic[str(a)] != b:
            not_found = True
    lst[a - 1] = b
if m == 0:
    special_case = True
if not_found:
    print(-1)
elif special_case:
    if n == 1:
        print(0)
    elif n == 2:
        print(10)
    else:
        print(100)
else:
    for i in range(n):
        if str(i + 1) not in list(dic.keys()):
            if i + 1 == 1:
                lst[i] = 1
            else:
                lst[i] = 0
    lst = list(map(str, lst))
    res = ''.join(lst)
    if res[0] == '0' and len(res) > 1:
        print(-1)
    else:
        print(int(res))

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
lst = [x for x in range(n)]
dic = {}
not_found = False
special_case = False
for i in range(m):
    a, b = map(int, input().split())
    if str(a) not in list(dic.keys()):
        dic[str(a)] = b
    else:
        if dic[str(a)] != b:
            not_found = True
    lst[a - 1] = b
if m == 0:
    special_case = True
if not_found:
    print(-1)
elif special_case:
    if n == 1:
        print(0)
    elif n == 2:
        print(10)
    else:
        print(100)
else:
    for i in range(n):
        if str(i + 1) not in list(dic.keys()):
            if i + 1 == 1:
                lst[i] = 1
            else:
                lst[i] = 0
    lst = list(map(str, lst))
    res = ''.join(lst)
    if res[0] == '0' and len(res) > 1:
        print(-1)
    else:
        print(int(res))
Seen by Sokun Deborey at 8:27 PM
Ang Sivhour
Problem p02772 (python)

Fixed submission:
N = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) == len(answer):
    print("APPROVED")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):
N = input()
A = [x for x in input().split()]
five = False
three = False
for x in range(A):
  if(x%5==0):
    five = True
  elif(x%3==0):
    three = True
    
if(five.equals(True) and three.equals(True)):
   print("APPROVED)
else:
   print("DENIED")

Buggy submission (verdict: Runtime Error):
N = input()
A = [x for x in input().split()]
five = False
three = False
for x in range(A):
  if(x%5==0):
    five = True
  elif(x%3==0):
    three = True
    
if(five.equals(True) and three.equals(True):
   print("APPROVED)
else:
   print("DENIED")
Problem p02783 (python)

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

Buggy submission (verdict: Runtime Error):
import math
H, A= [int(i) for i in input().split()]
print(math.ceil(H,A))
Problem p02582 (python)

Fixed submission:
t = input()
if (abs(len(t))<=3) and (t in 'S' or 'R'):
    if t[0]=='R' and t[1]=='R' and t[2]=='R':
        print(3)
    elif (t[0]=='R' and t[1]=='R' and t[2]!='R') or (t[0]!='R' and t[1]=='R' and t[2]=='R'):
        print(2)
    elif t[0]!='R' and t[1]!='R' and t[2]!='R':
        print(0)
    else:
        print(1)
else:
    print('false')

Buggy submission (verdict: Runtime Error):
x, k, d = map(int, input().split())
if (x - k*d > 0 and x > 0) or (x + k*d < 0 and x < 0):
    print(abs(x) - k*d )
else:
    if x % d == 0:
        if ((x/d) % 2) == (k % 2):
            print(0)
        else:
            print(d)
    else:
        y = abs(x)
        if (y % d < d - (y % d) and ((y - (y % d)) / d) % 2 == k % 2) or (y % d > d - (y % d) and ((y - (y % d)) / d) % 2 != k % 2):
            print(y % d)
        else:
            print(d - (y % d))
Problem p03495 (python)

Fixed submission:
n, k = map(int, input().split())
a = list(map(int, input().split()))
b = [0]*n
for i in range(n):
    b[a[i]-1] += 1
c = [i for i in b if i != 0]
c.sort()
if len(c) - k > 0:
    print(sum((c[0:len(c)-k])))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = list(map(int, input().split()))
b = [0]*n
for i in range(n):
    b[a[i]] += 1
c = [i for i in b if i != 0]
c.sort()
if len(c) - k > 0:
    print(sum((c[0:len(c)-k])))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = list(map(int, input().split()))
b = [0]*n
for i in range(n):
    b[a[i-1]] += 1
c = [i for i in b if i != 0]
c.sort()
if len(c) - k > 0:
    print(sum((c[0:len(c)-k])))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = list(map(int, input().split()))
b = [0]*n
for i in range(n):
    b[a[i-1]] += 1
c = [i for i in b if i != 0]
c.sort()
if len(c) - k > 0:
    print(sum((c[0:len(c)-k])))
else:
    print(0)
Problem p02576 (python)

Fixed submission:
N, X, T = map(int,input().split())
if N % X == 0:
  print( T*N // X )
else:
  print( T*(N // X + 1))

Buggy submission (verdict: Runtime Error):
if (int(input())%9 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
 N, X, T = map(int,input().split())
if N % X == 0:
  print( T*N // X )
else:
  print( N*T // X + T )
Problem p02641 (python)

Fixed submission:
X,N = map(int,input().split())
if N != 0:
  p = input().split()

for i in range(N):
    p[i] = int(p[i])
    
if N == 0:
    print(X)
else:    
    for i in range(2*N):
        if not (X-i) in p:
            print(X-i)
            break
        elif not (X+i) in p:
            print(X+i)
            break
        else:
          continue

Buggy submission (verdict: Runtime Error):
X,N = map(int,input().split())
p = input().split()

for i in range(N):
    p[i] = int(p[i])
    
if N == 0:
    print(X)
else:    
    for i in range(1,N+1):
        if not (X+i) in p:
            print(X+i)
            break
        elif not (X-i) in p:
            print(x-i)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
answer = 1
flag = 0
x = 10**18

if '0' in A:
  print(0)
  flag = 1
  
for i in range(N):
  answer *= int(A[i])
  if answer > x:
    print(-1)
    flag = 1
    break

if flag == 0:
  print(answer)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
answer = 1
flag = 0
x = 10**18
for i in range(N):
  A[i] = int(A[i])
  answer *= A[i]
  if answer == 0:
    break

check = answer/x
if ((check) >= 1) and (answer != x):
  print(-1)
else:
  print(answer)
Problem p02664 (python)

Fixed submission:
S = input()
length =len(S)
S = list(S)
count = 0

for i in range(length):
  if S[i] == '?':
    S[i] = 'D'

answer = "".join(S)
print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
length =len(S)
count = 0

for i in range(len):
  if S[i] = '?':
    S[i] = D

print(S)
Problem p02677 (python)

Fixed submission:
import math
A,B,H,M = map(int,input().split())
rad = abs(( H + M/60 ) * 30 - 6 * M)
rad = math.radians(rad)
cos = math.cos(rad)
answer = math.sqrt( A*A + B*B - 2*A*B*cos)
print(answer)

Buggy submission (verdict: Runtime Error):
import math
print(math.sqrt( {0}*{0} + {1}*{1} - 2*{0}*{1}*math.cos(math.radians(abs(( {2} * 30 - 11/2 * {3})))).format(map(int, input().split()))
Problem p02681 (python)

Fixed submission:
S = input()
T = input()
if (S in T) and (S[0] == T[0]):
  if ((len(S) > 1) and (S[1] == T[1])) or (len(S) == 1):
    print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
if (S in T) and (S[0] == T[0])
  if ((len(S) > 1) and (S[1] == T[1])) or (len(S) == 1):
    print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
if (S in T) and (S[0] == T[0])
  if ((len(S) > 1) and (S[1] == T[1])) or (len(S) = 1):
    print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
if (S in T) and (S[0] == T[0]) and (S[1] == T[1]):
  print('Yes')
else:
  print('No')
Problem p02690 (python)

Fixed submission:
X = int(input())
five = [0] * 200
five_inv = [0] * 200
for i in range(200):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  A = 0
  B = 0
  for i in range(200):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    elif X - five[i] in five:
      B = -i
      A = five.index(-five[i] + X)
      break
    elif X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(-five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))

Buggy submission (verdict: Runtime Error):
X = int(input())
five = [0] * 70
five_inv = [0] * 70
for i in range(70):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  for i in range(70):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    elif X - five[i] in five:
      B = -i
      A = five.index(-five[i] + X)
      break
    elif X + five[i] in five_inv:
      B = i
      A = -five_inv.index(five[i] + X)
      break
    elif X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(-five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))

Buggy submission (verdict: Runtime Error):
X = int(input())
five = [0] * 64
five_inv = [0] * 64
for i in range(64):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  for i in range(64):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    elif X - five[i] in five:
      B = -i
      A = five.index(-five[i] + X)
      break
    elif X + five[i] in five_inv:
      B = i
      A = -five_inv.index(five[i] + X)
      break
    elif X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(-five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))

Buggy submission (verdict: Runtime Error):
X = int(input())
five = [0] * 64
five_inv = [0] * 64
for i in range(64):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  for i in range(64):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    elif X - five[i] in five:
      B = -i
      A = five.index(-five[i] + X)
      break
    elif X + five[i] in five_inv:
      B = i
      A = -five_inv.index(five[i] + X)
      break
    elif X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(-five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))

Buggy submission (verdict: Runtime Error):
X = int(input())
five = [0] * 64
five_inv = [0] * 64
for i in range(64):
  five[i] = i ** 5
  five_inv[i] = -five[i]

def check(x):
  for i in range(64):
    if X + five[i] in five:
      B = i
      A = five.index(five[i] + X)
      break
    if X - five[i] in five:
      B = -i
      A = five.index(five[i] + X)
      break
    if X + five[i] in five_inv:
      B = i
      A = -five_inv.index(five[i] + X)
      break
    if X - five[i] in five_inv:
      B = -i
      A = -five_inv.index(five[i] + X)
      break
  return "{} {}".format(A,B)

print(check(X))
Problem p02705 (python)

Fixed submission:
R = input()

print( 2 * 3.141 * int(R) )

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

for i in range(1,N+1):
    print(A.count(str(i)))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
rank = []

for i in range(1,N+1):
    print(A.count(i))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
rank = []

for i in range(1,N+1):
    rank.append(A.count(i))
    


for i in range(0,N+1):
    print(rank[i])

Buggy submission (verdict: Runtime Error):
N,M = input().split()
A = input().split()
 
S = 0
for i in range(int(M)):
    S += int(A[ i - 1 ])

if int(N) - S >= 0:
    print(int(N) - S)
else:
    print("-1")

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

print( 2 * pi * R )

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

print( 2 * pi * R )