Problem:


Score : 400 points

Problem Statement

Give a pair of integers (A, B) such that A^5-B^5 = X.
It is guaranteed that there exists such a pair for the given integer X.

Constraints

1 \leq X \leq 10^9

X is an integer.

There exists a pair of integers (A, B) satisfying the condition in Problem Statement.

Input

Input is given from Standard Input in the following format:

X

Output

Print A and B, with space in between.
If there are multiple pairs of integers (A, B) satisfying the condition, you may print any of them.

A B

Sample Input 1

33

Sample Output 1

2 -1

For A=2 and B=-1, A^5-B^5 = 33.

Sample Input 2

1

Sample Output 2

0 -1



Sample input:
33


Sample output:
2 -1

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(40):
  for j in range(-40,40):
    if i**5-j**5==x:
      print(i,j)
      exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-118,120):
  for j in range(-119,1119):
    if i**5+j**5==x:
      print(i,j)
      exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
for a in range(-100, 101):
    for b in range(-100, 101):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            break
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
import math
X=int(input())
i=0
s=pow(X-i,0.2)
while s!=math.floor(s):
  i+=1
  s=pow(X-i,0.2)
print(i,-int(s))

Submission status: Wrong Answer

Solution code:
X=int(input())
flagp=False
flagm=False
for A in range(-10**2,10**2):
    B5=A**5-X
    for B in range(10**2):
        if B5==B**5:
            flagp=True
            break
        elif B5==-B**5:
            flagm=True
            break
    else:
        continue
    break
if flagp:
    print(A,B)
else:
    print(A,-B)

Submission status: Wrong Answer

Solution code:
X=int(input())
flagp=False
flagm=False
for A in range(10**2):
    B5=A**5-X
    for B in range(10**2):
        if B5==B**5:
            flagp=True
            break
        elif B5==-B**5:
            flagm=True
            break
    else:
        continue
    break
if flagp:
    print(A,B)
else:
    print(A,-B)

Submission status: Wrong Answer

Solution code:
X=int(input())
L=[i**5 for i in range(10**3)]
for i in range(100):
  a=X-L[i]
  b=X+L[i]
  if a in L:
    j=L.index(a)
    print(j,-i)
    exit()
  if b in L:
    j=L.index(b)
    print(j,i)
    exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
L=[i**5 for i in range(100)]
for i in range(100):
  a=X-L[i]
  b=X+L[i]
  if a in L:
    j=L.index(a)
    print(j,-i)
    exit()
  if b in L:
    j=L.index(b)
    print(j,i)
    exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

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

Submission status: Wrong Answer

Solution code:
X = int(input())

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

Submission status: Wrong Answer

Solution code:
def main():
    x = int(input())
    a_lst = [i for i in range(150)]
    b_lst = []
    for i in range(200):
        b_lst.append(-100 + i)

    flag = False
    for i in range(len(a_lst)):
        for j in range(len(b_lst)):

            a = a_lst[i]
            b = b_lst[j]
            if a ** 5 - b ** 5 == x:
                print(a, b)
                flag = True
                break

        if flag:
            break


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    x = int(input())
    a_lst = [i for i in range(100)]
    b_lst = []
    for i in range(200):
        b_lst.append(-100 + i)

    flag = False
    for i in range(len(a_lst)):
        for j in range(len(b_lst)):

            a = a_lst[i]
            b = b_lst[j]
            if a ** 5 - b ** 5 == x:
                print(a, b)
                flag = True
                break

        if flag:
            break


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X = int(input())
cnt=0
for a in range(-1000, 1001):
  for b in range(-1000, 1001):
    if a**5 - b**5 == X:
      print('a'+' b')
      exit()

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
A, B = 1, 1
for a in range(1, math.ceil(X ** (1 / 4)) + 10):
    tmp = abs(a ** 5 - X)**(1/5)
    if tmp % 1 == 0:
        A = a
        if a ** 5 - X > 0:
            B = int((a ** 5 - X)**(1 / 5))
        else:
            B = int((X - a ** 5)**(1 / 5)) * -1
        break
print(A, B)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
A, B = 1, 1
for a in range(1, math.ceil(X ** (1 / 4)) + 1):
    tmp = abs(a ** 5 - X)**(1/5)
    if tmp % 1 == 0:
        A = a
        if a ** 5 - X > 0:
            B = int((a ** 5 - X)**(1 / 5))
        else:
            B = int((X - a ** 5)**(1 / 5)) * -1
print(A, B)

Submission status: Wrong Answer

Solution code:
import sys
import heapq
from decimal import Decimal

input = sys.stdin.readline

x = int(input())


for i in range(1,1000):
    for j in range(-1000,1000):
        if i**5 + j**5 == x:
            print(i,j)
            exit(0)

Submission status: Wrong Answer

Solution code:
import sys
import heapq
from decimal import Decimal

input = sys.stdin.readline

x = int(input())


for i in range(1,1000):
    for j in range(-1000,1000):
        if i**5 + j**5 == x:
            print(i,j)
            break

Submission status: Wrong Answer

Solution code:
x = int(input())
for b in range(-int(x**(1/5)),10**6):
    a5 = b**5 + x
    if a5**(1/5) == a5**(1/5)//1:
        print(int(a5**(1/5)),b)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
for b in range(-int(x**(1/5)),10**5):
    a5 = b**5 + x
    if a5**(1/5) == a5**(1/5)//1:
        print(int(a5**(1/5)),b)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
for b in range(-int(x**(1/5)),int(x**(1/5))):
    a5 = b**5 + x
    if a5**(1/5) == a5**(1/5)//1:
        print(int(a5**(1/5)),b)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(10**9):
    a = i**5 + x
    if a*(1/5) == a*(1/5)//1:
        print(a,i)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(-100, 101):
    for j in range(-100,i):
        if i ** 5 - j ** 5 == x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
import numpy as np
X = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
div = make_divisors(X)
for i in range(len(div)):
    x = div[i]
    z = x**4 - X/x
    if z%5 == 0:
        s = z / 5
        if x**4 - 4*s >=0:
            y1 =( -x**2 + np.sqrt(x**4 - 4 * s)) / 2
            y2 =( -x**2 - np.sqrt(x**4 - 4 * s)) / 2 
            B1 = (-x + np.sqrt(x**2 + 4*y1))/2
            if (B1).is_integer:
                B = B1
                A = B + x
                break
            B12 = (-x + np.sqrt(x**2 + 4*y2))/2
            if (B12).is_integer:
                B = B12
                A = B + x
                break
            B2 = (-x - np.sqrt(x**2 + 4*y1))/2
            if (B2).is_integer:
                B = B2
                A = B + x
                break
            B21 = (-x - np.sqrt(x**2 + 4*y2))/2
            if (B21).is_integer:
                B = B21
                A = B + x
                break
print(int(A),int(B))

Submission status: Wrong Answer

Solution code:
X = int(input())

for A in range(-100, 100):
    for B in range(-100, 100):
        if A ** 5 - B ** 5 == X:
            print('%d %d' % (A, B))
            exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

p = make_divisors(x)

for i in p:
  for b in range(-100,100):
    if (b+i)**5 - b**5 == x:
      print(b+i,b)
      exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

p = make_divisors(x)
print(p)

for i in p:
  for b in range(-100,100):
    if (b+i)**5 - b**5 == x:
      print(b+i,b)
      exit()

Submission status: Wrong Answer

Solution code:
def main():
	X = int(input())
	fifth_power = [x ** 5 for x in range(201)]
	for i in range(len(fifth_power)):
		p = fifth_power[i]
		q1 = abs(X - p)
		q2 = abs(X + p)
		if q1 in fifth_power:
			if p + q1 == X:
				print(p, -fifth_power.index(q1))
			elif p - q1 == X:
				print(p, fifth_power.index(q1))
			return 0
		elif q2 in fifth_power:
			print(fifth_power.index(q2), p)
			return 0

main()

Submission status: Wrong Answer

Solution code:
a=int(input())
b=0
c=int(a**(1/2))
for i in range(-100,100):
    for j in range(-100,100):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)

Submission status: Wrong Answer

Solution code:
import math
x = int(input())

a = math.floor(x**(1/5))
while True:
    b = (x-a**5)**(1/5)
    print(b)
    if b % 1 == 0:
        print(a, -int(b))
        break
    a -= 1

Submission status: Wrong Answer

Solution code:
x = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())

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

Submission status: Wrong Answer

Solution code:
x=int(input())
l=[i**5 for i in range(-100,101)]
ok=False
for i in range(len(l)):
    if ok:
        break
    for j in range(len(l)):
        if l[i]-l[j]==x:
            print(i-100,j-100)
            ok=True
            break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(1,10000):
    b = a - 1
    if a**4 + a**3 * b + (a*b)**2 + a*b**3 + b**4 == x:
        print(a,b)
        exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
a = int(x**(1/5))
if a-x == 0:
    print(a,0)
elif a < x:
    print(a, int((x-a)**(1/5))*(-1))
else:
    print(a, int((a-x)**(1/5)))

Submission status: Wrong Answer

Solution code:
x = int(input())
a = 0
while True:
    print(a)
    for b in range(a):
        if abs(a ** 5 - b ** 5) == abs(x):
            if a ** 5 - b ** 5 == x:
                print(a, b)
                exit()
            else:
                print(-a, -b)
                exit()
        elif abs(a ** 5 + b ** 5) == abs(x):
            if a ** 5 + b ** 5 == x:
                print(a, -b)
                exit()
            else:
                print(-a, b)
                exit()
    a += 1

Submission status: Wrong Answer

Solution code:
X = int(input())

for a in range(-10**2, 10**2):
  for b in range(-10**2, 10**2):
    if a**5 - b**5 == X:
      print(a, b)
      exit()

Submission status: Wrong Answer

Solution code:
X = int(input()) 
flag = 0
for j in range(-90, 90):
    if flag == 1:
        break
    for k in range(-90, 90):
        if k**5 - j**5 == X:
            print(k,j)
            flag = 1
            break

Submission status: Wrong Answer

Solution code:
X = int(input()) 
flag = 0
for j in range(-90, 90):
    if flag == 1:
        break
    for k in range(-90, 90):
        if j**5 - k**5 == X:
            print(j,k)
            flag = 1
            break

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i ** 5 + j ** 5 == X:
            print(i, j)
            exit()

Submission status: Wrong Answer

Solution code:

def main():
    x = int(input())
    kouhodic = dict()
    for i in range(200):
        kouhodic[i ** 5] = i
        kouhodic[-i ** 5] = -i
    
    kouhodic = sorted(kouhodic.items())
    kazu = len(kouhodic)
    print(kouhodic)

    for i in range(kazu):
        for j in range(i+1, kazu):
            if kouhodic[j][0] - kouhodic[i][0] == x:
                print(kouhodic[j][1], kouhodic[i][1])
                exit()
    
    
    




if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:

def main():
    x = int(input())
    kouhodic = dict()
    for i in range(100):
        kouhodic[i ** 5] = i
        kouhodic[-i ** 5] = -i
    
    kouhodic = sorted(kouhodic.items())
    kazu = len(kouhodic)

    for i in range(kazu):
        for j in range(i+1, kazu):
            if kouhodic[j][0] - kouhodic[i][0] == x:
                print(kouhodic[j][1], kouhodic[i][1])
                exit()
    
    
    




if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

input = sys.stdin.readline


def ST():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(MI())


X = I()

for a in range(-118, 120):
    for b in range(-119, 119):
        if a ** 5 - b ** 5 == X:
            print(a, b)

Submission status: Wrong Answer

Solution code:
X=int(input())
a=0
b=0

if X%2==0:
    a=(X/2+1)
    b=(X/2-1)
else:
    a=((X+1)/2)
    b=((X+1)/2-1)

print(a,b)

Submission status: Wrong Answer

Solution code:
X=int(input())
a=0
b=0


for i in range(0,X+1):
    for j in range(i+1,X+1):
        T=(j+i)*(j-i)
        if X%T==0:
            a=i*(X//T)
            b=j*(X//T)

print(a,b)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
 
ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

x = I()

A = []
As = []
B = []
Bs = []

for i in range(64):
  n = i ** 5
  A.append(i)
  As.append(n)
  B.append(i)
  Bs.append(n)
  B.append(-i)
  Bs.append(-n)

xs = [a-x for a in As]
for i, x in enumerate(xs):
  if x in Bs:
    print(A[i], B[Bs.index(x)])
    break

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
 
ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

x = I()

A = []
As = []
B = []
Bs = []

for i in range(64):
  n = i ** 5
  A.append(i)
  As.append(n)
  B.append(i)
  Bs.append(n)
  B.append(-i)
  Bs.append(-n)

xs = [x-a for a in As]
for i, x in enumerate(xs):
  if x in Bs:
    print(A[i], -B[Bs.index(x)])
    break

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
 
ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

x = I()

A = []
As = []
B = []
Bs = []

for i in range(64):
  n = i ** 5
  A.append(i)
  As.append(n)
  B.append(i)
  Bs.append(n)
  B.append(-i)
  Bs.append(-n)

xs = [x-a for a in As]
for i, x in enumerate(xs):
  if x in Bs:
    print(A[i], B[Bs.index(x)])
    break

Submission status: Wrong Answer

Solution code:
x = int(input())
cnt = 0
while True:
    a = cnt ** 5
    if a < x:
        a = x - a
        z = -1
    else:
        a = a - x
        z = 1

    a **= 0.2
    if a % 1 == 0:
        print(cnt, int(a * z))
        break

    cnt += 1

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())
def NIJIGEN(H): return [list(input()) for i in range(H)]
X=int(input())
L=list()
R=list()
for i in range(-100,101):
  L.append(i**5)
  R.append(i)
for i in range(-100,101):
  if (i**5)+X in L:
    n=L.index((i**5)+X)
    print(R[n],i)
    exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
for i in range(-10**2,10**2):
    for j in range(max(i+1,1),10**2):
        if j**5-i**5==X:
            print(j,' ',i)
            exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
for i in range(-10**2,10**2):
    for j in range(i+1,10**2):
        if j**5-i**5==X:
            print(j,' ',i)
            exit()

Submission status: Wrong Answer

Solution code:
N=int(input())
L=[i**5 for i in range(101)]
for i in L:
    if N-i in L:
        if i-N>0:
            print(L.index(i),L.index(i-N))
        else:
            print(L.index(i),-1*L.index(N-i))
        break
    elif N+i in L:
        print(L.index(i+N),L.index(i))
        break

Submission status: Wrong Answer

Solution code:
X = int(input())

A = [0]
while A[-1]**5 <= X:
    A.append(A[-1]+1)

a5 = []
for a in A:
    a5.append(a**5)

for i in range(len(A)):
    if X-a5[i] in a5:
        b = a5.index(X-a5[i])
        print(i, -1*b)
        break

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(-100,100):
    for j in range(-100,100):
        if(i**5-j**5==n):
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

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

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-80,80):
    for j in range(-80,80):
        if i**5-j**5==x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-40,40):
    for j in range(-40,40):
        if i**5-j**5==x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(-65,65):
    for j in range(-65,65):
        if i**5 - j**5 == X:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
for A in range(-100, 101):
    for B in range(-100, 101):
        if A**5-B**5 == X:
            print(A, B); exit()

Submission status: Wrong Answer

Solution code:
def main():
    X = int(input())

    for A in range(-100, 100):
        for B in range(-100, 100):
            if A**5 - B**5 == X:
                print(A, B)
                return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def resolve():
    X = int(input())

    for a in range(-200, 200):
        for b in range(-199, 199):
            if (a**5 - b**5) == X:
                print(a, b)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
x=int(input())
A=[i**5 for i in range(-70,70)]
for i in range(140):
    for j in range(i):
        if A[i]-A[j]==x:
            print(*[i-70,j-70]);exit()

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

d =math.floor(math.pow(X, 1.0/5.0))
for i in range(-d-1,d+1,1):
    for j in range(-d-1,d+1,1):
        if X+j**5==i**5:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

d =math.floor(math.pow(X, 1.0/5.0))
for i in range(d+1):
    for j in range(d+1):
        if X-i**5==j**5:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

for A in range(-200,200):
    for B in range(-200,200):
        if A**5+B**5 == X:
            print(A,B)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
n = [i**5 for i in range(63)]

a = 0
b = 0
for i in range(len(n)-1):
    sign = 1 - 2*(n[i] < x)
    for j in range(i):
        if (n[i] - n[j] * sign) == x:
            print(i,j*sign)
            break

Submission status: Wrong Answer

Solution code:
import math

def main():
    X=int(input())

    for a in range(-120,120):

        b=pow(abs(pow(a,5)-X),1/5)

        if pow(a,5)-X<=0:
            b*=-1

        if int(b)==b:
            print("{} {}".format(a,int(b)))
            break


if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(200):
    for j in range(-200, 0):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(100):
    for j in range(-100, 0):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()

Submission status: Wrong Answer

Solution code:
def resolve():
    X = int(input())

    for a in range(200):
        for b in range(-199, 199):
            if (a**5 - b**5) == X:
                print(a, b)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    X = int(input())

    for a in range(200):
        for b in range(200, -200, -1):
            if (a**5 - b**5) == X:
                print(a, b)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    X = int(input())

    for a in range(200):
        for b in range(199):
            if (a**5 - b**5) == X:
                print(a, b)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    X = int(input())

    for a in range(200):
        for b in range(199):
            if (a**5 + b**5) == X:
                print(a, b)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from itertools import product
def main():
    x = int(input())
    n5 = [i**5 for i in range(1000)]
    c = product(n5, repeat=2)
    for ce in c:
        print(ce)
        if ce[0] + ce[1] == x:
            r = (int(ce[0]**0.2), int(ce[1]**0.2)* -1)
            break
        elif ce[0] - ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))
            break
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    x = int(input())
    p1 = 1
    while True:
        p15 = p1 ** 5
        rt1 = ((x + p15) ** 0.2) % 1
        if rt1 == 0:
            r = (int((x + p15) ** 0.2), p15)
            break
        if (x - p15) < 0:
            rt2 = ((-1*(x - p15)) ** 0.2) % 1
            if rt2 == 0:
                r = (int((-1*(x - p15)) ** 0.2), -p15)
                break
        else:
            rt3 = ((x - p15) ** 0.2) % 1
            if rt3 == 0:
                r = (int((x - p15) ** 0.2), -p15)
                break
        p1 += 1
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
NUM=100

X=int(input())

ans_A=0
ans_B=0
flg=False

for i in reversed(range(NUM)):
    for j in range(-1*NUM,NUM):
        res=i**5-j**5
        if res==X:
            ans_A=i
            ans_B=j
            flg=True
            break
    if flg:
        break

print(ans_A,ans_B)

Submission status: Wrong Answer

Solution code:
import sys
X=int(input())
for A in range(800):
    for B in range(-800,A+1):
        if X==A**5-B**5:
            print('{} {}'.format(A,B))

Submission status: Wrong Answer

Solution code:
import sys
X=int(input())
b_s=-1*int(X**(1/5))
for B in range(b_s,10**6):
    A=(B**5+X)**(1/5)
    if A.is_integer():
        print('{} {}'.format(int(A),B))
        sys.exit()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def main():
    import sys

    input = sys.stdin.readline

    X = int(input())

    for a in range(-100, 101):
        for b in range(-100, 101):
            if a ** 5 - b ** 5 == X:
                print(a, b, sep=' ')
                return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
x = int(input())

# -100 ~ 100 ^ 5
pow5 = {}
for i in range(-1000, 1001):
    pow5[i] = int(math.pow(i, 5))

for i in range(-1000, 1001):
    a = x + pow5[i]
    for j in range(-100, 101):
        if a == pow5[j]:
            print(j, i)
            exit()

Submission status: Wrong Answer

Solution code:
import math
x = int(input())

# -100 ~ 100 ^ 5
pow5 = {}
for i in range(-100, 101):
    pow5[i] = int(math.pow(i, 5))

for i in range(-100, 101):
    a = x + pow5[i]
    for j in range(-100, 101):
        if a == pow5[j]:
            print(j, i)
            exit()

Submission status: Wrong Answer

Solution code:
import math
import sys
readline = sys.stdin.readline


def main():
    x = int(readline().rstrip())
    a, b, c = 0, 0, 1

    while a < 100:
        k = a ** 5 - x
        c = 1 if k >= 0 else - 1
        b = abs(k) ** 0.2
        if int(b) ** 5 == abs(k):
            print(a, c * abs(int(b)))
            return
        a += 1


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
import sys
readline = sys.stdin.readline


def main():
    x = int(readline().rstrip())
    a, b, c = 0, 0, 1

    while a < 10000:
        c = 1 if a ** 5 - x > 0 else - 1
        b = c * (c * (a ** 5 - x)) ** 0.2
        if b - int(b) == 0:
            print(a, int(b))
            return
        a += 1


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(-200,200):
    for j in range(-200,200):
        if i^5-j^5==x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

for a in range(-118,119):
    for b in range(-119,118):
        if a**5 - b**5 == X:
#            print((a,b))
            break
    else:
        continue
    break

print((a,b))

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(-100, 100):
    num = abs((x+i**5)**0.2)
    if num.is_integer():
        print(int(num), i)
        break

Submission status: Wrong Answer

Solution code:
X=int(input())

for a in range(-101,101):
    for b in range(-101,101):
        if a**5-b**5==X:
            print(a,b)
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
A = []
for i in range(200):
    A.append(pow(i, 5))
for i in range(200):
    for j in range(200):
        a = abs(A[i] - A[j])
        b = A[i] + A[j]
        if a == X:
            if i <= j:
                B = [i, -j]
            else:
                B = [i, j]
            print(' '.join(map(str, B)))
            exit()
        elif b == X:
            B = [i, -j]
            print(' '.join(map(str, B)))
            exit()

Submission status: Wrong Answer

Solution code:
l=[]
for i in range(0,8000):
    l.append(i*i*i*i*i)
n=int(input())
for i in range(0,8000) :
    if(abs(n-l[i]) in l):
        t=l.index(abs(n-l[i]))
        if(n-l[i]>=0):            
            print(i,t)
        else:
            print(i,-t)

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(100):
  for j in range(100):
    if i**5-j**5 == X:
      print(i, j)
      break

Submission status: Wrong Answer

Solution code:
X = int(input())
ans = None

for i in range(32):
    if ans == None:
        for t in range(-32,32):
            if i**5 - t**5 == X:
                ans = i,t
                break
            else:
                continue
    else:
        print(ans[0],ans[1])
        break

Submission status: Wrong Answer

Solution code:
import sys

x = int(input())
for a in range(1,1000):
    a_5 = a**5
    print(a_5)
    if a_5 > x:
        b = 1
        s = x+1
        while s > x:
            s = a_5 - b**5
            if s == x:
                print(a, b)
                sys.exit()
            b += 1
            
    elif a_5 < x:
        b = -1
        s = x-1
        while s < x:
            s = a_5 - b**5
            if s == x:
                print(a, b)
                sys.exit()
            b -= 1
    else:
        print(a,0)
        sys.exit()

Submission status: Wrong Answer

Solution code:
import sys

x = int(input())
for a in range(1,100):
    a_5 = a**5
    
    if a_5 > x:
        b = 1
        s = x+1
        while s > x:
            s = a_5 - b**5
            if s == x:
                print(a, b)
                sys.exit()
            b += 1
            
    elif a_5 < x:
        b = -1
        s = x-1
        while s < x:
            s = a_5 - b**5
            if s == x:
                print(a, b)
                sys.exit()
            b -= 1
    else:
        print(a,0)
        sys.exit()

Submission status: Wrong Answer

Solution code:
import sys

x = int(input())
for a in range(1,100):
    a_5 = a**5
    
    if a_5 > x:
        b = 1
        s = 0
        while s > x:
            s = a_5 - b**5
            if s == x:
                print(a, b)
                sys.exit()
            b += 1
            
    elif a_5 < x:
        b = -1
        s = 0
        while s < x:
            s = a_5 - b**5
            if s == x:
                print(a, b)
                sys.exit()
            b -= 1
    else:
        print(a,0)
        sys.exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

flag = False
for i in range(100, -1, -1):
  #print(i)
  for j in range(i, -101, -1):
    #print(j)
    if i - j != 0:
      if x % (i - j) == 0:
        y = x / (i - j)
        t = i ** 4 + (i ** 3) * j + (i ** 2) * (j ** 2) + i * (j ** 3) + j ** 4
        if y == t:
          lst = [str(i), str(j)]
          print(' '.join(lst))
          flag = True
          break
    else:
      if x == 0:
        print('0 0')
        flag = True
        break
  if flag:
    break

Submission status: Wrong Answer

Solution code:
from sys import stdin
input = stdin.readline


def main():
  X = int(input())

  for b in range(-500, 500):
    for a in range(-500, 500):
      if a**5 - b**5 == X:
        print(a, b)


if(__name__ == '__main__'):
  main()