Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [list(map(int, input().split())) for i in range(m)]
r = [[] for i in range(n + 1)]
ans = 0
for i in range(m):
    r[l[i][0]].append(l[i][1])
    r[l[i][1]].append(l[i][0])
p = []
for i in range(n):
    p.append(i + 1)
p = list(itertools.permutations(p))
for i in range(len(p)):
    check = True
    t = list(p[i])
    if t[0] != 1:
        check = False
    for j in range(len(t)-1):
        if not t[j + 1] in r[t[j]]:
            check = False
    if check:
        ans += 1
print(ans)

Fixed submission:
import itertools
n, m = map(int, input().split())
l = [list(map(int, input().split())) for i in range(m)]
r = [[] for i in range(n + 1)]
ans = 0
for i in range(m):
    r[l[i][0]].append(l[i][1])
    r[l[i][1]].append(l[i][0])
p = []
for i in range(n):
    p.append(i + 1)
p = list(itertools.permutations(p))
for i in range(len(p)):
    check = True
    t = list(p[i])
    if t[0] != 1:
        check = False
    for j in range(len(t)-1):
        if not t[j + 1] in r[t[j]]:
            check = False
    if check:
        ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
count = 0
for i in range(a+1):
    for j in range(a+1):
        for k in range(a+1):
            if i + j + k == b:
                count += 1
print(count)

Fixed submission:
a, b = map(int, input().split())
c = a+1
count = 0
for i in range(c):
    for j in range(c):
        if 0 <= (b - i - j) <= a:
            count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if b == "+":
    print(a + c)
else:
    print(a-c)

Fixed submission:
a, b, c = input().split()
if b == "+":
    print(int(a) + int(c))
else:
    print(int(a) - int(c))
Buggy python submission (verdict: Runtime Error):
Atcoder 173 b

N = int(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0


for i in range(N):
    C = input()
    If C == ‘AC’:
        C0 += 1
    elif C == ‘WA’:
        C1 += 1
    elif C == ‘LTE’:
        C2 += 1
    elif C == ‘RE’:
        C3 += 1

print(‘AC x ‘ + str(C0))
print(‘WA x ‘ + str(C1))
print(‘LTE x ‘ + str(C2))
print(‘RE x ‘ + str(C3))

Fixed submission:
N = int(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0


for i in range(N):
    C = input()
#    print(C)
    if C == 'AC':
        C0 += 1
    elif C == 'WA':
        C1 += 1
    elif C == 'TLE':
        C2 += 1
    elif C == 'RE':
        C3 += 1

print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
count = 0
for i in a:
    if b[i] != a[i]:
        b[i] = a[i]
        count +=  1
print(count)

Fixed submission:
a = input()
b = input()
count = 0
for i in range(len(a)):
    if b[i] != a[i]:
        count +=  1
print(count)
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>

void swap(int *a,int *b){
    int tmp;
    tmp = *a;
    *a = *b;
    *b = tmp;    
    return;
}

int main(void){
    int i,j,ans=0,N,K,p[1000];

    //入力部
    scanf("%d %d",&N,&K);
    for(i=0; i<N; i++){
        scanf("%d",&p[i]);
    }

    //計算部
    for(i=0;i<N-1;i++){
        for(j=i;j<N-1;j++){
            if(p[j]>p[j+1]){
                swap(&p[j],&p[j+1]);
            }
        }
    }
    for(i=0;i<K;i++){
        ans+=p[i];
    }

    //表示部
    printf("%d\n",ans);

    return 0;
}




Fixed submission:
a = input().split()
# a[0] is N個
# a[1] is K個
b = list(map(int, input().split()))
b.sort()

sum = 0

for i in range(int(a[1])):
    sum += b[i]

print(sum)
Buggy python submission (verdict: Runtime Error):
x1,x2,x3,x4,x5 = map(int, input().split())

if x1 == 0:
    print(1)
elif x2 == 0:
    print(2)
elif x3 == 0:
    print(3)
elif x4 == 0:
    print(4)
elif x5 == 0:


Fixed submission:
x1,x2,x3,x4,x5 = map(int, input().split())

if x1 == 0:
    print(1)
elif x2 == 0:
    print(2)
elif x3 == 0:
    print(3)
elif x4 == 0:
    print(4)
elif x5 == 0:
    print(5)
Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split())
ans = ‘No’ 
for i in range(X):
    j = X - i 
    if i * 2 + j * 4 == Y:
        ans = ‘Yes’

print(ans)

Fixed submission:
X, Y = map(int, input().split())
ans = 'No'
for i in range(X):
    j = X - i 
    if i * 2 + j * 4 == Y:
        ans = 'Yes'
    elif j * 2 + i * 4 == Y:
        ans = 'Yes'
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans = 1

for i in range(N):
    if A[i] == 0:
        ans = 0
        break
    else:
        ans *= A[i]

if ans <= 10 ** 18:
    print(ans)
else:
    print(-1)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = 1

if 0 in A:
    ans = 0
else:
    for i in range(N):
        ans *= A[i]
        if ans > 10 ** 18:
            ans = -1
            break

print(ans)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split)))
sum = 0
ans = "Yes"
for i in range(len(A)):
  sum += A[i]
judge = sum / (4*M)
for i in ramge(len(A)):
  if A[i] < judge:
    ans = "No"
    break
print(ans)

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
sumA = sum(A)
count = 0
judge = sumA / (4*M)
for i in range(len(A)):
  if A[i] >= judge:
    count += 1
if count < M:
  ans = "No"
else:
  ans = "Yes"
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

N,M = map(int,input().split())
#Nは偶数
#Mは奇数

#偶数偶数
Nf = math.factorial(N)/math.factorial(N-2)/2

#奇数奇数
Mf = math.factorial(M)/math.factorial(M-2)/2

ans = int(Nf + Mf)

print(ans)

Fixed submission:
import math

N,M = map(int,input().split())
#Nは偶数
#Mは奇数

#偶数偶数
if N >= 2:
  Nf = math.factorial(N)//(math.factorial(N-2)*2)
else:
  Nf = 0
#奇数奇数
if M >= 2:
  Mf = math.factorial(M)//(math.factorial(M-2)*2)
else:
  Mf = 0
ans = int(Nf + Mf)
print(ans)
Buggy python submission (verdict: Runtime Error):
def palindrome(S):
  for i in range(len(S)//2):
#    print(S[i],S[-(i+1)])
    if S[i] != S[-(i+1)]:
      return 0
  return 1
ans = "No"
S = input()
S1 = S[:(len(S)-1)//2]
S1 = S[(len(S)+3)//2:]
if palindrome(S) == 1:
  if palindrome(S1) == 1:
    if palindrome(S2) == 1:
      ans == "Yes"
print(ans)

Fixed submission:
def palindrome(S):
  for i in range(len(S)//2):
#    print(S[i],S[-(i+1)])
    if S[i] != S[-(i+1)]:
      return 0
  return 1
ans = "No"
S = input()
S1 = S[:(len(S)-1)//2]
S2 = S[(len(S)+1)//2:]
#print(palindrome(S))
#print(palindrome(S1))
#print(palindrome(S2))

if palindrome(S) == 1:
  if palindrome(S1) == 1:
    if palindrome(S2) == 1:
      ans = "Yes"
print(ans)
Buggy python submission (verdict: Runtime Error):
N,R = int(input())
ans = 0
if N < 10:
  ans = R
else:
  ans = R + 100 * (10-N)
print(ans)
"""
  内部-X = 表示R
  内部 = 表示R + X
"""

Fixed submission:
N,R = map(int,input().split())
ans = 0
if N >= 10:
  ans = R
else:
  ans = R + 100 * (10-N)
print(ans)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
if N == M:
  print('Yes')
else:
  pritn('No')

Fixed submission:
N,M = map(int,input().split())
if N == M:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
count = 0
for i in range(N):
  if S[i] == 'A':
    if S[i+1] == 'B':
      if S[i+2] == 'C':
        count += 1
print(count)

Fixed submission:
N = int(input())
S = input()
count = 0
if N == 3:
  if S == 'ABC':
    count = 1
elif N > 3:
	for i in range(N-2):
		if S[i] == 'A':
			if S[i+1] == 'B':
				if S[i+2] == 'C':
					count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
K = int(input())
if(K%2==0):
    print(-1)
    exit()
check=list(str(K))
if(check[-1]=='5'):
    print(-1)
    exit()
else:
    seven=7
    if(int(''.join(['7']*(K-1)))%K==0):
        print(K-1)
        exit()
    while True:
        if(seven%K==0):
            print(len(str(seven)))
            break
        else:
            seven=seven*10+7



Fixed submission:
k = int(input())
if(k%2==0 or k%5==0):
    print(-1)
    exit()
else:
    i=1
    seven=7%k
    while seven!=0:
        seven = (seven*10+7)%k
        i+=1
    print(i)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
money = 1000
cab = 0
lowprice = A[0]
check = True
for i in range(1,N):
    if(lowprice>A[i]):
        lowprice = A[i]
        check= True
    elif(lowprice<A[i] and check == True):
        high_price = A[i]
        if(i<=N-1):
            if(high_price > A[i+1]):
                cab=money//lowprice
                money-=(lowprice*cab)
                money+=(high_price*cab)
                cab = 0
                check = False
                lowprice = high_price
        else:
            cab=money//lowprice
            money-=(lowprice*cab)
            money+=(high_price*cab)
            cab = 0
            check = False
            lowprice = high_price


print(money)


Fixed submission:
N = int(input())
A = list(map(int,input().split()))
money = 1000
cab = 0
lowprice = A[0]
check = True
for i in range(1,N):
    if(lowprice>A[i]):
        lowprice = A[i]
        check= True
    elif((lowprice<A[i]) and (check == True)):
        high_price = A[i]
        if(i<N-1):
            if(high_price > A[i+1]):
                cab=money//lowprice
                money-=(lowprice*cab)
                money+=(high_price*cab)
                cab = 0
                check = False
                lowprice = high_price
        else:
            cab=money//lowprice
            money-=(lowprice*cab)
            money+=(high_price*cab)
            cab = 0
            check = False
            lowprice = high_price
print(money)
Buggy python submission (verdict: Runtime Error):
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
time = 0
count = 0
Ain = 0
Bin = 0
if(min(min(A),min(B))>K):
    print(0)
    exit()
while time<=K:
    if(len(A)!=0 and len(B)!=0):
        if(A[Ain]<B[Bin]):
            time+= A[Ain]
            Ain+=1
            count +=1
        elif(A[Ain]>B[Bin]):
            time += B[Bin]
            Bin+=1
            count+=1
    if((len(A)==0) and (len(B)==0)):
        break
    elif(len(A)==0):
        time += B[Bin]
        Bin += 1
        count += 1
    elif(len(B)==0):
        time += A[Ain]
        Ain += 1
        count += 1
if(time == K):
    print(count)
else:
    print(count-1)

Fixed submission:
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_sum = [0]
B_sum = [0]
A_sum.extend(A)
B_sum.extend(B)
for i in range(1,N+1):
    A_sum[i]+=A_sum[i-1]
for i in range(1,M+1):
    B_sum[i]+=B_sum[i-1]
ans,j=0,M
for i in range(N+1):
    if A_sum[i]>K:
        break
    while B_sum[j]+A_sum[i]>K:
        j-=1
    ans = max(ans,i+j)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
time = 0
count = 0
if(min(min(A),min(B))>K):
    print(0)
    exit()
while time<=K:
    if(len(A)!=0 and len(B)!=0):
        if(A[0]<B[0]):
            time+= A[0]
            A.pop(0)
            count +=1
        elif(A[0]>B[0]):
            time += B[0]
            B.pop(0)
            count+=1
    elif((len(A)==0) and (len(B)==0)):
        break
    elif(len(A)==0):
        time += B[0]
        B.pop(0)
        count += 1
    elif(len(B)==0):
        time += A[0]
        A.pop(0)
        count += 1
if(time == K):
    print(count)
else:
    print(count-1)

Fixed submission:
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_sum = [0]
B_sum = [0]
A_sum.extend(A)
B_sum.extend(B)
for i in range(1,N+1):
    A_sum[i]+=A_sum[i-1]
for i in range(1,M+1):
    B_sum[i]+=B_sum[i-1]
ans,j=0,M
for i in range(N+1):
    if A_sum[i]>K:
        break
    while B_sum[j]+A_sum[i]>K:
        j-=1
    ans = max(ans,i+j)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import collections
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
c = collections.Counter(A)
counter_key = list(c.keys())
counter_value = list(c.values())
list_sum_A=[]
sum_A=sum(A)
list_sum_A.append(sum_A)
B_list = []
C_list = []
for i in range(Q):
    B,C= map(int,input().split())
    B_list.append(B)
    C_list.append(C)

for i in range(1,Q+1):
    B = B_list[i-1]
    C = C_list[i-1]
    if(B not in counter_key):
        list_sum_A.append(list_sum_A[i-1])
    else:
        key_index=counter_key.index(B)
        list_sum_A.append(list_sum_A[i-1]+C*counter_value[key_index]-B*counter_value[key_index])
        if(C not in counter_key):
            counter_key[key_index]=C
        else:
            C_value_index = counter_key.index(C)
            counter_value[C_value_index]=counter_value[C_value_index]+counter_value[key_index]
            counter_value.pop(key_index)
            counter_key.pop(key_index)
for i in range(1,Q+1):
    print(list_sum_A[i])

Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    s = [0 for i in range(10**5+1)]
    sa = sum(a)
    for i in a:
        s[i] += 1
    q = int(input())
    for _ in range(q):
        b, c = map(int, input().split())
        s[c] += s[b]
        sa += (c-b)*s[b]
        s[b] = 0
        print(sa)

main()

Buggy python submission (verdict: Time Limit Exceeded):
import collections
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
c = collections.Counter(A)
counter_key = list(c.keys())
counter_value = list(c.values())
list_sum_A=[]
sum_A=sum(A)
list_sum_A.append(sum_A)
B_list = []
C_list = []
for i in range(Q):
    B,C= map(int,input().split())
    B_list.append(B)
    C_list.append(C)

for i in range(1,Q+1):
    B = B_list[i-1]
    C = C_list[i-1]
    if(B not in counter_key):
        list_sum_A.append(list_sum_A[i-1])
    else:
        key_index=counter_key.index(B)
        list_sum_A.append(list_sum_A[i-1]+C*counter_value[key_index]-B*counter_value[key_index])
        if(C not in counter_key):
            counter_key[key_index]=C
        else:
            C_value_index = counter_key.index(C)
            counter_value[C_value_index]=counter_value[C_value_index]+counter_value[key_index]
            counter_value.pop(key_index)
            counter_key.pop(key_index)
for i in range(1,Q+1):
    print(list_sum_A[i])

Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    s = [0 for i in range(10**5+1)]
    sa = sum(a)
    for i in a:
        s[i] += 1
    q = int(input())
    for _ in range(q):
        b, c = map(int, input().split())
        s[c] += s[b]
        sa += (c-b)*s[b]
        s[b] = 0
        print(sa)

main()
Buggy python submission (verdict: Runtime Error):
X,N=map(int,input().split())
P = list(map(int,input().split()))
value = float('inf')
if(N==0):
    print(X)
    exit()
ans_value= 100
for i in range(-1,102):
    if (i not in P):
        if(abs(X-i)<value):
            value=abs(X-i)
            ans_value=i
print(ans_value)

X,N=map(int,input().split())
P = list(map(int,input().split()))
value = float('inf')
if(N==0):
    print(X)
    exit()
ans_value= 100
for i in range(-1,102):
    if (i not in P):
        if(abs(X-i)<value):
            value=abs(X-i)
            ans_value=i
print(ans_value)



Fixed submission:
X,N=map(int,input().split())
P = list(map(int,input().split()))
value = float('inf')
if(N==0):
    print(X)
    exit()
ans_value= 101
for i in range(0,102):
    if (i not in P):
        if(abs(X-i)<value):
            value=abs(X-i)
            ans_value=i
print(ans_value)
Buggy python submission (verdict: Time Limit Exceeded):
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
A_low =A
A_high =A
B_low = B
B_high=B
for i in range(T):
    A_low=A_low-V
    A_high=A_high+V
    B_low=B_low-W
    B_high=B_high+W
    if((B_low>=A_low) and (B_high<=A_high)):
    
        print("YES")
        exit()
    
print("NO")

Fixed submission:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
A_low =A
A_high =A
B_low = B
B_high=B
A_low=A_low-(V*T)
A_high=A_high+(V*T)
B_low=B_low-(W*T)
B_high=B_high+(W*T)
if((B_low>=A_low) and (B_high<=A_high)):
    print("YES")
    exit()
    
print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
A_low =A
A_high =A
B_low = B
B_high=B
for i in range(T):
    A_low=A_low-V
    A_high=A_high+V
    B_low=B_low-W
    B_high=B_high+W
    if((B_low>=A_low) and (B_high<=A_high)):
    
        print("YES")
        exit()
    
print("NO")

Fixed submission:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
A_low =A
A_high =A
B_low = B
B_high=B
A_low=A_low-(V*T)
A_high=A_high+(V*T)
B_low=B_low-(W*T)
B_high=B_high+(W*T)
if((B_low>=A_low) and (B_high<=A_high)):
    print("YES")
    exit()
    
print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
def func2(l, value):
    i = -1
    c = len(l)
    result = []
    while i < c:
        try:
            i = l.index(value, i + 1)
            result.append(i)
        except:
            return result
    return result

T=list(input())
que_list=(func2(T,"?"))
T_now= T
ans_T = ''.join(T)
count = 0 
N=T.count("?")
op = ["P"] * N

for i in range(2 ** N):
    op_now = op
    for j in range(N):
        if ((i >> j) & 1):
            op_now[N - 1 - j] = "D"
    for k,que_index in zip(op_now,que_list):
        T[que_index]=k
    test_T=''.join(T)
    check_value=test_T.count("D")+test_T.count("DP")
    if(count < check_value):
        ans_T = test_T
        count = check_value
    T=T_now
print(''.join(ans_T))

Fixed submission:
def func2(l, value):
    i = -1
    c = len(l)
    result = []
    while i < c:
        try:
            i = l.index(value, i + 1)
            result.append(i)
        except:
            return result
    return result

T=list(input())
que_list=(func2(T,"?"))
for i in que_list:
    T[i]='D'
print(''.join(T))

Buggy python submission (verdict: Runtime Error):
def func2(l, value):
    i = -1
    c = len(l)
    result = []
    while i < c:
        try:
            i = l.index(value, i + 1)
            result.append(i)
        except:
            return result
    return result

T=list(input())
que_list=(func2(T,"?"))
T_now= T
ans_T = ''.join(T)
count = 0 
N=T.count("?")
for i in range(2 ** N):
    op = ["P"] * N
    for j in range(N):
        if ((i >> j) & 1):
            op[N - 1 - j] = "D"
    for k,que_index in zip(op,que_list):
        T[que_index]=k
        test_T=''.join(T)
    check_value=test_T.count("D")+test_T.count("DP")
    if(count < check_value):
        ans_T = test_T
        count = check_value
    T=T_now
print(''.join(ans_T))


Fixed submission:
def func2(l, value):
    i = -1
    c = len(l)
    result = []
    while i < c:
        try:
            i = l.index(value, i + 1)
            result.append(i)
        except:
            return result
    return result

T=list(input())
que_list=(func2(T,"?"))
for i in que_list:
    T[i]='D'
print(''.join(T))
Buggy python submission (verdict: Runtime Error):
def main():
    
N=int(input())
A=list(map(int,input().split()))
sum_value = sum(A)
chiled_value = 1
top_value = 1
if(N==0 & A[0]==1):
    print(-1)
    exit()
if(A[0]!=0):
    print(-1)
    exit()
for i in range(1,N):
    if(sum_value >= chiled_value*2):
        top_value += chiled_value*2
        chiled_value = chiled_value*2-A[i]
        sum_value=sum_value-A[i]
    elif(sum_value < chiled_value*2):
        chiled_value=sum_value
        top_value += chiled_value
        sum_value=sum_value-A[i]
    if(A[i]>=2**i):
        print(-1)
        exit()
print(top_value+A[N])





Fixed submission:

N=int(input())
A=list(map(int,input().split()))
sum_value = sum(A)
chiled_value = 1
top_value = 1
if(N==0 and A[0]==1):
    print(1)
    exit()
if(A[0]!=0):
    print(-1)
    exit()
for i in range(1,N):
    if(sum_value >= chiled_value*2):
        top_value += chiled_value*2
        chiled_value = chiled_value*2-A[i]
        sum_value=sum_value-A[i]
        if(A[i+1]>chiled_value*2):
            print(-1)
            exit()
    elif(sum_value < chiled_value*2):
        chiled_value=sum_value
        top_value += chiled_value
        sum_value=sum_value-A[i]
    if(A[i]>=2**i):
        print(-1)
        exit()
if((sum_value-A[N])!=0):
    print(-1)
    exit()
print(top_value+A[N])
Buggy python submission (verdict: Runtime Error):
import numpy as np
A,B,C,K=map(int,input().split())
total=np.array([0]*(A+B+C))
total[0:A]=1

total[A+1:A+B]=0
total[A+B:A+B+C]=-1
print(sum(total[0:K]))


Fixed submission:
import numpy as np
A,B,C,K=map(int,input().split())
if(A>=K):
    print(K)
elif(A+B>=K):
    print(A)
else:
    print(A-(K-(A+B)))
Buggy python submission (verdict: Runtime Error):
import sympy as sp
import numpy
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
if __name__ == '__main__':
    X  = int(input())

    list_list=prime_factorize(X)
    if(len(list_list)==1):
        A=list_list[0]
        B=1
    elif(len(list_list)==0):
        A=1
        B=1
    else:
        A=list_list[0]
        B=numpy.prod(list_list[1:])

    sp.init_printing()
    sp.var('x, y, a, b, c, d, e, f')
    eq1=sp.Eq(x-y, A)
    eq2=sp.Eq(x**4+x**3*y+x**2*y**2+x*y**3+y**4, B)
    sorver_list=sp.solve ([eq1, eq2], [x, y])
    print(str(sorver_list[0][0])+' '+str(sorver_list[0][1]))


Fixed submission:
X=int(input())

for i in range(-120,120):
    for j in range(-120,120):
        if(i**5-j**5==X):
            print(i,j)
            exit()

Buggy python submission (verdict: Runtime Error):
from sympy import *
import numpy
X  = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
list_list=prime_factorize(X)
if(len(list_list)==1):
    A=list_list[0]
    B=1
elif(len(list_list)==0):
    A=1
    B=1
else:
    A=list_list[0]
    B=numpy.prod(list_list[1:])
import sympy as sp
sp.init_printing()
sp.var('x, y, a, b, c, d, e, f')
eq1=sp.Eq(x-y, A)
eq2=sp.Eq(x**4+x**3*y+x**2*y**2+x*y**3+y**4, B)
sorver_list=sp.solve ([eq1, eq2], [x, y])
print(str(sorver_list[0][0])+' '+str(sorver_list[0][1]))


Fixed submission:
X=int(input())

for i in range(-120,120):
    for j in range(-120,120):
        if(i**5-j**5==X):
            print(i,j)
            exit()