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())
import math
#print(x)
for i in range(100):
    a = x + (i ** 5)
    a2 = x - (i ** 5)
    #print("i", i, "a", a, "a2", a2)

    if a > 0:
        v = math.pow(a, 1.0/5.0)
        if v.is_integer():
            v=int(v)
            #print("v1", v)
            print(v, i)
            break
    else:
        v = math.pow(-a, 1.0 / 5.0)
        if v.is_integer():
            v=int(v)
            #print("v2", v)
            print(-v, i)
            break

    if a2 > 0:
        v = math.pow(a2, 1.0/5.0)
        if v.is_integer():
            v=int(v)
            #print("v3", v)
            print(v, -i)
            break
    else:
        v = math.pow(-a2, 1.0 / 5.0)
        if v.is_integer():
            v=int(v)
            #print("v4", v)
            print(-v, -i)
            break

Submission status: Wrong Answer

Solution code:
x=int(input())
flag=False
ansi=0
ansj=0
for i in range(1,64):
    for j in range(-64,0):
        if i**5-j**5==x:
            ansi=i
            ansj=j
            flag=True
            break
    if flag:
        break
if not flag:
    for i in range(1,122):
        for j in range(1,122):
            if i**5-j**5==x:
                ansi=i
                ansj=j
                flag=True
                break
        if flag:
            break
print(str(i)+" "+str(j))

Submission status: Wrong Answer

Solution code:
import itertools

X = int(input())

limit = 10 ** 9
check = [0]
now = 1
add = 1
while add < limit:
    add = now ** 5
    minus_add = add * -1
    check.append(add)
    check.append(minus_add)
    now += 1
new_array = sorted(check)
len_new_array = len(new_array)
check_combi = list(itertools.combinations(range(len(new_array)), 2))
for x in check_combi:
    # print(x[0], x[1])
    if new_array[x[0]] - new_array[x[1]] == X:
        print(x[0] - (len_new_array - 1) // 2, x[1] - (len_new_array - 1) // 2)
        break
    if new_array[x[1]] - new_array[x[0]] == X:
        print(x[1] - (len_new_array - 1) // 2, x[0] - (len_new_array - 1) // 2)
        break

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())
X -= 1
A = int(X**.2)
print(A, -1)

Submission status: Wrong Answer

Solution code:
import math
def main():
    x = int(input())
    tmp = [0] * 71
    for i in range(71):
        tmp[i] = i**5
    for i in range(71):
        a = x+tmp[i]
        if abs(a) in tmp:
            if a + tmp[i] == x:
                print(int(a**0.2),-i)
                return
            elif a - tmp[i] == x:
                print(int(a**0.2),i)
                return
            else:
                print((-1) * int(a**0.2), i)
                return
        a = x - tmp[i]
        if abs(a) in tmp:
            if a + tmp[i] == x:
                print(int(a**0.2),-i)
                return
            elif a - tmp[i] == x:
                print(int(a**0.2),i)
                return
            else:
                print((-1) * int(a**0.2), i)
                return
if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
X = int(input())
A = [0] * 101
m = 0
n = 0
for i in range(101):
  A[i] = i ** 5
for i in range(101):
  x = A[i]
  for j in range(101):
    y = A[j]
    if ((x + y) == X):
      m = i
      n = (-1) * j
    elif ((x - y) == X):
      m = i
      n = j
print(m, n)

Submission status: Wrong Answer

Solution code:
x = int(input())

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

Submission status: Wrong Answer

Solution code:
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

pfs = prime_factorize(x)

for a in range(1000):
  b = a - 1
  if (a**5 - b**5 == x):
    print(a, b)
    break

for pf in pfs:
  for a in range(1000):
    b = a - pf
    if (a**5 - b**5 == x):
      print(a, b)
      break

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

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

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

def solve():
    x = II()
    l = - 100000
    r = 100000
    ds = make_divisors(x)
    # print(ds)
    # for i in range(0, len(d), 2):
    #     j = i+1
    #     print(d[i], d[j])
    for d in ds:
        # print(d)
        for a in range(l, r):
            b = a - d
            if (pow(a, 5) - pow(b, 5)) == x:
                # print(a, b, pow(a, 5) - pow(b, 5))
                return

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
#D
import math ,sys
x = int(input())
for a in range(math.ceil(math.log10(x))):
    for b in range(-10 ** 9//2, 10 ** 9//2):
        if a ** 5 - b ** 5 == x:
            print(a, b)
            sys.exit()

Submission status: Wrong Answer

Solution code:
import sys

x=int(input())
for a in range(10**2):
    for b in range(10**2):
        if a**5 - b**5==x:
            print(a,b)
            sys.exit()
        if (-a)**5 - b**5==x:
            print(-a,b)
            sys.exit()
        if a**5 - (-b)**5==x:
            print(a,-b)
            sys.exit()
        if (-a)**5 - (-b)**5==x:
            print(-a,-b)
            sys.exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
for a in range(int(x**(0.2))+1):
  if a**5 >= x:
    b = (a**5 -x)**(0.2)
  else:
    b = -(x-a**5)**(0.2)
  if b == int(b):
    print(a,b)
    exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
for j in range(2,int(X**0.5)+1):
    if X%j==0:
        for a in range(j):
            b=a-j
            S=j*(a**4+b**4+(a**3)*b+(a**2)*(b**2)+a*(b**3))
            if S==X:
                print(a,b)
                exit(0)
if X==1:
    print(0,-1)

Submission status: Wrong Answer

Solution code:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


x = int(input())

# n,m,q = map(int, input().split())
# abcd = [map(int, input().split())for _ in range(q)]

# a = list(map(int, input().split()))

_numbers = make_divisors(x)
numbers = []
for i in _numbers:
    numbers.append(i)
    numbers.append(-i)
make = []
for a in range(-100,100):
    for b in range(-100, 100):
        if a**4 + b*a**3 + (a**2)*(b**2) + a*(b**3) + b**4 in numbers:
            make.append([a**4 + b*a**3 + (a**2)*(b**2) + a*(b**3) + b**4,a,b])

for i in make:
    if i[0]*(i[1]-i[2]) == x:
        print(i[1], i[2])
        exit()

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(a,b)
            exit()

Submission status: Wrong Answer

Solution code:
X=int(input())

def ok(B):
    i=1
    B=abs(B)
    while i**5<B:
        i+=1
    return i



X_5=[]
i=1
while i**5<X:
    X_5.append(i**5)
    i+=1

for a in X_5:
    B_5=a-X
    r=ok(B_5)
    if r==abs(B_5):
        print(ok(a),r*(-1 if B_5<0 else 1))
        break

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

x=INT()

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

Submission status: Wrong Answer

Solution code:
import math


def search(a, x):
    b_5 = a ** 5 - x
    b = math.pow(abs(b_5), 1 / 5)
    if b_5 < 0:
        b *= -1
    return b


def main():
    x = int(input().strip())
    a = 0
    while True:
        a = int(a)
        a1 = a
        a2 = -1 * a

        b1 = search(a1, x)
        b2 = search(a2, x)

        if b1 == int(b1):
            a = a1
            b = b1
            break
        if b2 == int(b2):
            a = a2
            b = b2
            break
        a += 1
    print('{} {}'.format(int(a), int(b)))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    X = int(input())
    import math
    for i in range(0,10001,2):
        for j in range(-10000,1,1):
            # if i == j:
            #     continue
            if (i-j) * (pow(i,4) + pow(i,3)*j + pow(i,2)*pow(j,2) + i*pow(j,3) + pow(j,4)) == X:
                print(i,j)
                exit()
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
x = int(input())
import math
for i in range(100):
    b = (x - i ** 5) ** -5
    #print(i, b)
    if i ** 5 - math.floor(b) ** 5 == x:
        print(i, math.floor(b))
        exit()
    if i ** 5 - (-math.floor(b)) ** 5 == x:
        print(i, -math.floor(b))
        exit()
    if i ** 5 - math.ceil(b) ** 5 == x:
        print(i, math.ceil(b))
        exit()
    if i ** 5 - (-math.ceil(b)) ** 5 == x:
        print(i, -math.ceil(b))
        exit()

Submission status: Wrong Answer

Solution code:
from sys import stdin
x = int(stdin.readline().rstrip())
k = True
a = 0
c = False
while k:
    b = a**5 - x
    if b < 0:
        b *= (-1)
        c = True
    d = int(b**(1/5))    
    if d ** 5 == b:
        k = False
        break
    a += 1
if c:
    d *= -1
print(a,d)

Submission status: Wrong Answer

Solution code:
x = int(input())
l = [x*x*x*x*x for x in range(0, 121)]
for i in range(121):
	for j in range(121):
		if l[i] == l[j] + x:
			print(i, end=" ")
			print(j)
			break
		if l[i] + l[j] == x:
			print(j, end=" ")
			print(-i)
			break

Submission status: Wrong Answer

Solution code:
X = int(input())

A = []
for i in range(-100, 100):
    for j in range(-100, 100):
        A.append([i,j])

for pair in A:
    if (pair[0] ** 5 - pair[1] ** 5) == X:
        print(pair[0], pair[1])
        exit()

Submission status: Wrong Answer

Solution code:
# coding:utf-8
x = int(input())
a = 0
b = 0
num_list = [i**5 for i in range(0, 40)]
#print(num_list)

for i in range(2, 40):
    if (x - i**5) in num_list:
        a = i
        break
b = int(-((x - a**5) ** (1 / 5)))
print(a, b)

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(int((x)**(1/5))+1):
    for j in range(-int((x)**(1/5))-1,int((x)**(1/5))+1):
        if i**5 - j**5 == x:
            print(i,j)
            break
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(1001001001):
    _b = a**5 - x
    if _b > 0:
        if _b**0.2 == int(_b**0.2):
            print(a, int(_b**0.2))
            break
    elif _b < 0:
        _b = -1*_b
        if _b**0.2 == int(_b**0.2):
            print(a, -1*int(_b**0.2))
            break

Submission status: Wrong Answer

Solution code:
import math



X = int(input())
for a in range(-10**3, 10**3+1):

   

    b5 = pow(a, 5) - X
    if b5 < 0:
        mb = True
        b5 *= -1
    else:
        mb = False
    b = pow(b5, 1.0/5.0)
    

    if type(b) == float and float(b).is_integer():
 

        if mb:
            b *= -1

        print(a, int(b))
        exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
A = [i for i in range(0, 100)]
B = [-i for i in range(0, 100)]
res = []
for i in range(len(A)):
  a = A[i]
  for j in range(len(B)):
    b = B[j]
    cal = a ** 5 - b ** 5
    if cal == X:
      print(a, b)
      exit()

Submission status: Wrong Answer

Solution code:
import math

x=int(input())
l=[]

for i in range(100):
    a=i**5
    if a>10**9:
        break
    else:
        l.append(a)
        l.append(-a)
for j in l:
    for k in l:
        aa=j-k
        if j!=k and aa==x:
            ans=[]
            for z in [j,k]:
                aaa=abs(z)**(1/5)
                if z>=0:
                    ans.append(int(aaa))
                else:
                    ans.append(int(-aaa))
            print(*ans)                
            exit()

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
for x in range(0,n,2):
    xf = x**5
    yf = abs(n-xf)
    y = math.pow(yf,0.2)
    for i in [1,-1]:
        for j in [1,-1]:
            xf *= i
            yf *= j
            x *= i
            y *= j
            if y.is_integer() and ((xf-yf == n) or (yf-xf == n)):
                print(x,int(y))
                exit(0)
            xf *= i
            yf *= j
            x *= i
            y *= j

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def get_yakusu(P):
    yakusu = []
    for i in range(1, int(math.sqrt(P))+1):
        if P % i == 0:
            yakusu.append(i)
            if i != int(P / i):
                yakusu.append(int(P / i))
    return yakusu


X_yakusu = get_yakusu(X)

flag = False
for A in range(0, max(int(10**1.4), int((10**9/5)**0.25))+1):
    if flag:
        break
    for x in X_yakusu:
        B = A - x
        if A ** 5 - B ** 5 == X:
            print(A, B)
            flag = True
            break

Submission status: Wrong Answer

Solution code:
import sys

x = int(input())
flag = False
a = 0

while True:
    if x - a**5 <= 0:
        b_sub = abs(x - a**5)**(1/5)
    else:
        b_sub = (-1)*(x - a**5)**(1/5)
    # b_sub = (x - a**5)**(1/5)
    # if int(b_sub) - b_sub == 0:
    if b_sub.is_integer():
        # flag = True
        print(a,int(b_sub))
        sys.exit()
    a += 1

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(-10,10):
    for j in range(-10,10):
        if i**5 - j**5 == x:
            print(i,j)
            quit()

Submission status: Wrong Answer

Solution code:
x = int(input())

x2 = int(x**0.5)
if x2**5 == x:
  print(x2, 0)
  exit()
elif x2**5-1 == x:
  print(X2, -1)
  exit()
  
for i in range(1, int(x**0.5)+1):
  if x%i == 0:
    tmp1 = 0
    tmp2 = 0
    a1 = i
    b1 = 0
    a2 = i-1
    b2 = -1
    while tmp1 < x and tmp2 < x:
      tmp1 = a1**5 - b1**5
      tmp2 = a2**5 - b2**5
      if tmp1 == x:
        print(a1, b1)
        exit()
      elif tmp2 == x:
        print(a2, b2)
        exit()
      a1+=1
      b1+=1
      a2-=1
      b2-=1

Submission status: Wrong Answer

Solution code:
import sys

X = int(sys.stdin.readline())

x = 0
break_flag = 0
y = 0
while True:
    if x**5 >= X:
        while y < x:
            if x**5 - y**5 == X:
                print(x, y)
                break_flag = 1
                break
            y += 1
        y = 0
        x = x - 1
        while True:
            if x ** 5 - (-y)**5 == X:
                print(x, -y)
                break_flag = 1
                break
            y += 1
    x += 1
    if break_flag == 1:
        break

Submission status: Wrong Answer

Solution code:
def func(B, X):
    return abs((X + B**5)**(1/5))

X = int(input())


for b in range(0, 10 ** 9 + 1):
    a = func(b, X)
    if (a.is_integer()):
        print(int(a), b)
        exit(0)
    
    a = func(-b, X)
    if (a.is_integer()):
        print(int(a), -b)
        exit(0)

Submission status: Wrong Answer

Solution code:
x=int(input())

for i in range(int(x**0.2)):

    sign=1
    b=(i**5-x)

    if b<0:
        sign=-1
    b=sign*((b*sign)**0.2)
    
    if b==int(b):
        print(i,int(b))
        break

Submission status: Wrong Answer

Solution code:
x = int(input(''))

can = []
for a in range(10**2):
    if not a in can:
        can.append(a**5)

result = []
for a in can:
    for b in can:
        if a - b == x:
            ans = "{} {}".format(int(a**(1/5)),int(b**(1/5)))
            if not ans in result:
                result.append(ans)
        if a + b == x and a > b:
            ans = "{} {}".format(int(a**(1/5)),int(-1 * b**(1/5)))
            if not ans in result:
                result.append(ans)

for r in result:
    print(r)

Submission status: Wrong Answer

Solution code:
x = int(input())

lower = -1
upper = -1
for i in range(0, 10000):
    pow5 = pow(i, 5)
    if lower == -1 and pow5 >= x:
        lower = i - 1

    if upper == -1 and pow5 - pow(i-1, 5) >= x:
        upper = i
        break

for a in range(lower, upper+1):
    a5 = pow(a, 5)
    for b in range(-10000, a):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

# 0, 0
print(0, 0)

Submission status: Wrong Answer

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

X = int(input())
print(0, -X)

Submission status: Wrong Answer

Solution code:
X = int(input())

for i in range(10001):
    for j in range(10001):
        if i**5 + j**5 ==X:
            x=max(i,j)
            y=min(i,j)
            print(x, y)
            exit()
        if i**5 - j**5 ==X:
            x=max(i,j)
            y=min(i,j)
            print(x, y)
            exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
i=0
while True:
    a=(i**5-x)
    if(a<0):
        a*=-1
        a=a**(1/5)
        a*=-1
    else:
        a=a**(1/5)
    if(a==int(a)):
        print(i,int(a))
        break
    
    a=(i**5+x)
    if(a<0):
        a*=-1
        a=a**(1/5)
        a*=-1
    else:
        a=a**(1/5)
    if(a==int(a)):
        print(int(a),i)
        break
    
    i+=1

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

N=input()

#約数列挙
def make_divisors(n):
    divisors=[]
    for i in range(1, int(n**0.5)+1):
        if n%i==0:
            divisors.append(i)
            if i!=n/i:
                divisors.append(n/i)
    return divisors

yakusu=1
def func(a,b):
    return a**5-b**5

L=make_divisors(N)

for yakusu in L:
    a=1
    while True:
        b=a-yakusu
        ret=func(a,b)
        if ret==N:
            print a,b
            quit()
        elif N<ret:
            break
        a+=1

Submission status: Wrong Answer

Solution code:
X = int(input())

for i in range(0, X):
    if int(X - i ** 5) ** 0.2 == X - i ** 5:
        print(str(i) + " " + str(-int(int(X - i ** 5) ** 0.2)))
        break

Submission status: Wrong Answer

Solution code:
def main():

    from bisect import bisect_left as bl, bisect_right as br, insort
    import sys,heapq,math
    from collections import defaultdict as dd, deque
    def data(): return sys.stdin.readline().strip()
    def mdata(): return list(map(int, data().split()))
    out = sys.stdout.write
    # sys.setrecursionlimit(100000)
    INF = int(1e9)
    mod = int(1e9)+7

    x=int(data())
    a=-int(x**(1/5)+1)
    while True:
        b = (abs(a ** 5 - x)) ** (1 / 5)
        if a ** 5 - x<0:
            b=-b
        if b==int(b):
            print(a, int(b))
            exit()
        a += 1

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

for a in range(0,100):
    for b in range(-100, 100):
        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 = 1
flag = 0
while(i <= math.sqrt(X) and flag == 0):
  if(X % i == 0):
    A = 0
    B = A-i
    while(abs(A) <= abs(B) and flag == 0):
      if(A**4 + (A**3)*B + (A**2)*(B**2) + A*(B**3) + B**4 == X//i):
        print(A, B)
        flag = 1
      A += 1
      B += 1
  i += 1

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from math import gcd
import time
import sys
from collections import Counter
import itertools
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
start = time.time()
# N, M = map(int, input().split(' '))
X = int(input())

gojou = []
i = 0
saidai = 10**10

while 1:
    temp = i**5
    if temp > saidai:
        break
    gojou.insert(0, temp)
    gojou.insert(0, -temp)
    i += 1

ls = len(gojou)
for i in range(ls):
    for j in range(i, ls):
        if gojou[i]-gojou[j] == X:
            print(gojou[i], gojou[j])
            exit()

Submission status: Wrong Answer

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

for b in range(-100000,100000):
    if x+b**5>=0:
        a=(x+b**5)**0.2
        if math.floor(a)==math.ceil(a):
            print(math.floor(a), b)
            exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
A = []
a=0
while a**5 < 10.0**9:
    A.append(a**5)
    a+=1

for i, a_5 in enumerate(A):
    for j, b_5 in enumerate(A[i+1:]):
        if b_5 - a_5 == X:
            print(str(i+j+1) + ' ' + str(i))
            exit()
        elif b_5 + a_5 == X:
            print(str(i+j+1) +' ' + str((-1)*i))
            exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

# for b in range(65, -64, -1):
for b in range(10000, -10000, -1):
    a = (X + b**5)**0.2
    # print('b a', b, a)
    if type(a) == complex:
        continue
    if a.is_integer():
        print(int(a), b)
        exit()

Submission status: Wrong Answer

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    X = int(input())
    import math
    for i in range(0,10001,2):
        for j in range(-10000,1,1):
            if i == j:
                continue
            if (i-j) * (pow(i,4) + pow(i,3)*j + pow(i,2)*pow(j,2) + i*pow(j,3) + pow(j,4)) == X:
                print(i,j)
                exit()
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
from math import floor
from math import ceil
X = int(input())

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

Submission status: Wrong Answer

Solution code:
X = int(input())
A = [i for i in range(0, 100)]
B = [-i for i in range(0, 100)]
res = []
for i in range(len(A)):
  a = A[i]
  for j in range(len(B)):
    b = B[j]
    cal = a ** 5 - b ** 5
    if cal == X:
      res.append([a, b])
# print(' '.join(map(str, res[0])))

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(-5000, 5000):
    for j in range(-5000, 5000):
        if pow(i, 5)-pow(j, 5)==X:
            print(i, j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())
a = int(x ** (1/5))
b = a

while b >= -1*a:
    if a**5 - b**5 == x:
        print(str(a)+' '+str(b))
        break
    b -= 1

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
for a in range(100):
    b = a ** 5 - x
    b = pow(b, 1.0/5.0)
    if isinstance(b, int) == True:
        print(a, b)
        break

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
f=False
for i in range(-64,64):
    for j in range(-64,64):
        if i**5-j**5==x:
            print(i,j)
            f = True
            break
    if f:break

Submission status: Wrong Answer

Solution code:
x=int(input())

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

Submission status: Wrong Answer

Solution code:
import math
import itertools


def sol():
    x = int(input())
    for b in range(-1, 70):
        tmp = b ** 5
        tmp += x
        a = tmp ** (1 / 5)
        if math.floor(a) == math.ceil(a):
            print(int(a), int(b))
            return


if __name__ == '__main__':
    sol()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from itertools import product
X =int(input())
a = [i ** 5 for i in range(64)]
b = [(-i) ** 5 for i in range(64)]
for i, j in product(range(64), range(64)):
    if a[i] - b[j] == X:
        print(f'{i} {-j}')
        break

Submission status: Wrong Answer

Solution code:
X=int(input())
l=[]
for y in range(1,X//2+2):
	if X%y==0:
		l.append(y)
K=len(l)
A=-1
for y in range(0,K):
	KKK=0
	i=0
	A=-1
	while KKK<X:
		A=A+1
		KKK=A**5-(A-l[y])**5
	if KKK==X:
		print(A,A-l[y])
		break

Submission status: Wrong Answer

Solution code:
X=int(input())

C=[0]
for i in range(1,64):
    C.append(pow(i,5))

c=0
ans1=0
ans2=0
while c<=X:
    temp=X-c
    if temp in C:
        ans2=C.index(temp)
        break
    else:
        ans1+=1
        c=C[ans1]

print(ans1,-ans2)

Submission status: Wrong Answer

Solution code:
X = int(input())

for i in range(0, X):
    if int(X - i ** 5) ** 0.2 == X - i ** 5:
        print(str(i) + " " + str(-int(int(X - i ** 5) ** 0.2)))

Submission status: Wrong Answer

Solution code:
X = int(input())

root = int(X**(1/5))

if root**5 < X:
    rest = X - root**5
    another = -int(rest**(1/5))
else:
    rest = root**5 - X
    another = int(rest**(1/5))

print(root, another)

Submission status: Wrong Answer

Solution code:
x = int(input())

lower = -1
upper = -1
for i in range(0, 100000):
    pow5 = pow(i, 5)
    if lower == -1 and pow5 >= x:
        lower = i - 1

    if upper == -1 and pow5 - pow(i-1, 5) >= x:
        upper = i
        break

for a in range(lower, upper+1):
    a5 = pow(a, 5)
    for b in range(-100000, a):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

# 0, 0
print(0, 0)

Submission status: Wrong Answer

Solution code:
X= int(input())

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

Submission status: Wrong Answer

Solution code:
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/input.txt"
exit $?
'''
import sys


def _i(): return int(sys.stdin.readline().strip())


def main():
    x = _i()
    i = 0
    while True:
        i5 = i ** 5
        if x > 2 * i5:
            i += 1
            continue
        for j in range(-i, i+1):
            j5 = j ** 5
            ij = i5 + j5
            if ij == x:
                return f"{i} {j}"
            if ij > x:
                break
        i += 1


if __name__ == "__main__":
    print(main())

Submission status: Wrong Answer

Solution code:
D = {}
k = 40
x = int(input())
for i in range(-k, k+1):
    D[i] = i**5
for i in range(-k, k+1):
    for j in range(-k, k+1):
        if D[i]-D[j] == x:
            print(i,j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input(''))

can = []
for a in range(10**2):
    if not a in can:
        can.append(a**5)

result = []
for a in can:
    for b in can:
        if a - b == x:
            ans = "{} {}".format(int(a**(1/5)),int(b**(1/5)))
            if not ans in result:
                result.append(ans)
        if a + b == x and a > b:
            ans = "{} {}".format(int(a**(1/5)),int(b**(1/5)))
            if not ans in result:
                result.append(ans)

for r in result:
    print(r)

Submission status: Wrong Answer

Solution code:
import math

X=int(input())

root = math.floor(X**0.2)
half = root//2 - 5

while root > half:
    root2 = (X-root**5)**0.2
    if root**5 + root2**5 == X:
        print(int(root),-int(root2))
        exit()
    root -= 1

root = math.ceil(X**0.2)

while True:
    root2 = (root**5-X)**0.2
    if root**5 - root2**5 == X:
        print(int(root),int(root2))
        exit()
    root+=1

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
a=0
while ans==0:
  b=0
  c=0
  while pow(a,5)-pow(b,5)<=n and pow(a,5)-pow(b,5)>0:
    if pow(a,5)-pow(b,5)==n:
      print(str(a)+" "+str(b))
      ans=1
    b=b+1
  while pow(a,5)-pow(c,5)<=n and pow(a,5)-pow(c,5)>0:
    if pow(a,5)-pow(c,5)==n:
      print(str(a)+" "+str(c))
      ans=1
    c=c-1
  a=a+1

Submission status: Wrong Answer

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