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:
import numpy as np
import sys

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

if __name__ == "__main__":
    X = int(input())
    divs = make_divisors(X)
    #print(divs)
    a = 0
    while True:
        for d in divs:
            b_p = 0
            b_n = 0
            while True:
                b_p += d
                b_n -= d
                #print(b_p)
                if a**5 - b_p**5 == X:
                    #print(a)
                    #print(b_p)
                    print("{} {}".format(int(a), int(b_p)))
                    sys.exit()
                if a**5 - b_n**5 == X:
                    print("{} {}".format(int(a), int(b_p)))
                    sys.exit()
                if b_p > a:
                    #print('break')
                    break
        a += 1

Submission status: Wrong Answer

Solution code:
import sys

def input():
    return sys.stdin.readline().strip()

def trial_division(n):
    prime_factors = list()
    while n % 2 == 0:
        prime_factors.append(2)
        n //= 2
    p = 3
    while p * p <= n:
        if n % p == 0:
            prime_factors.append(p)
            n //= p
        else:
            p += 2
    if n != 1:
        prime_factors.append(n)
    return prime_factors

def keisan(A,B):
    return A**4 + A**3 * B + A**2 * B**2 + A * B ** 3 + B**4

def main():
    X = int(input())
    if X == 1:
        print(1,0)
        exit()
    soinsu = trial_division(X)
    soinsu = list(set(soinsu))
    B = -1
    for s in soinsu:
        A = s + B
        if A**5 - B**5 == X:
            print(A,B)
            exit()


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = n
flag = 0
 
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)
if ans == 1:
  a.append(1)

for i in range(10**4):
  x = i
  y = x-a[0]
  if x**5 - y**5 == ans:
    print(x,y)
    flag = 1
    break

if flag == 0:
  for i in range(10**4):
    x = i
    y = x-a[1]
    if x**5 - y**5 == ans:
      print(x,y)
      break
    
if flag == 0:
  for i in range(-10000,0):
    x = i
    y = x-a[0]
    if x**5 - y**5 == ans:
      print(x,y)
      break

Submission status: Wrong Answer

Solution code:
X = int(input())

AA = 0
BB = 0

for A in range(101):
    for B in range(101):
        if X == (A ** 5) - (B ** 5):
            AA = A
            BB = B

if AA == 0 and BB == 0:
    for A in range(101):
        if X == (A ** 5) + 1:
            AA = A
            BB = -1

print(AA,BB)

Submission status: Wrong Answer

Solution code:
X = int(input())

num = [i ** 5 for i in range(100)]

for A in range(100):
    for B in range(100):
        if num[A] + num[B] == X:
            print(A, (-1)*B)
            exit(0)
        elif num[A] - num[B] == X:
            print(A, B)
            exit(0)

Submission status: Wrong Answer

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    X=I()
    for A in range(int(sqrt(X))+1):
        B_=pow(A,5)-X

        B = int(pow(abs(B_),-5))
        if(B_<0):
            B *= -1
        if(B**5==B_):
            print(A,B)
            return
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X=int(input())
flag=0
for i in range(10**9):
    A=i**5
    B=A-X
    if B<0:
        for j in range(10**9):
            b=j**5
            if B+b==0:
                ans=[i,j]
                flag=1
                break
            elif B+b>0:
                break
    else:
        for j in range(10**9):
            b=j**5
            if B-b==0:
                ans=[i,j]
                flag=1
                break
            elif B-b<0:
                break
    if flag==1:
        break
print(i,j)

Submission status: Wrong Answer

Solution code:
x = int(input())

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

    if lower != -1 and 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(-upper-1, upper+1):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

# 0, 0
print(0, 0)

Submission status: Wrong Answer

Solution code:
def f(A, B):
    return A**5 - B**5
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr
X = int(input())
AB = factorization(X)
if len(AB) == 1:
    x = AB[0][0] ** AB[0][1]
    y = x
else:
    x = AB[0][0] ** AB[0][1]
    y = AB[1][0] ** AB[1][1]
A = x
B = 0
for i in range(x):
    if f(A, B) == X:
        print(A, B)
        exit()
    A -= 1
    B -= 1

A = y
B = 0
for i in range(y):
    if f(A, B) == X:
        print(A, B)
        exit()
    A -= 1
    B -= 1

Submission status: Wrong Answer

Solution code:
a = int(input())
for i in range(-100,100,1):
    for j in range(-100,100,1):
        if a == ((i**5) - (j**5)):
            print(i, j)
            break;
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
A = 1
B = 1
A = math.log(X, 5) - B
B = math.log(X, 5) - A
print(A, B)

Submission status: Wrong Answer

Solution code:
X = int(input())
j = 1
for i in range(1,X//2+2):
  if X%i == 0:
    if i != 1:
      j = i
      break


a_b=j
tmp = X//i
for k in range(-1000,1000):
  b = -k
  a = a_b + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()
for k in range(-1000,1000):
  b = -k
  a = tmp + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

# for b in range(65, -64, -1):

for a in range(1000000, -1000000, -1):
    b = -(X - a**5)**0.2
    # print('b a', b, a)
    if type(b) == complex:
        if b.imag != 0:
            continue
        print(a, int(b.real))
        exit()
    elif b.is_integer():
        print(a, int(b))
        exit()

# for b in range(1000000, -1000000, -1):
#     a = (X + b**5)**0.2
#     # print('b a', b, a)
#     if type(a) == complex:
#         if a.imag != 0:
#             continue
#         print(int(a.real), b)
#         exit()
#     elif a.is_integer():
#         print(int(a), b)
#         exit()

Submission status: Wrong Answer

Solution code:
import numpy
import math

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

    divisors.sort()
    return divisors

X = int(input())
lis = make_divisors(X)

for i in range(len(lis)):
    Y = lis[i]
    Z = X // Y
    tmp = numpy.roots([5, 10*Y, 10*pow(Y, 2), 5*pow(Y, 3), pow(Y, 4)-Z])
    ans = []
    for j in range(len(tmp)):
        if round(tmp[j].imag) == 0:
            ans.append(int(tmp[j].real))
    if len(ans) == 2:
        ans.sort(reverse=True)
        tmp = ans[0]**5 - ans[1]**5
        if tmp == X: break

print(' '.join(map(str, ans)))

Submission status: Wrong Answer

Solution code:
x = int(input())

import math
def trial_division(n):
    #素因数を格納するリスト
    num_list = []
    factor = set(num_list)
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.add(num)
    #リストが空ならそれは素数
    if not factor:
        return [1]
    else:
        factor.add(n)
        return factor


for number in trial_division(x):
  for a in range(round(x**(1/5))):
    b = a - number
    if a**5 - b**5 == x:
      print(a,b)
      break
    elif a**5 - (-b)**5==x:
      print(a,-b)
      break

Submission status: Wrong Answer

Solution code:
import math
def D():
    X = int(input())
    for x in range(X):
        A = math.pow(x, 5)
        B = A-X
        if B == 0 or math.log(abs(B), 5).is_integer():
            print(int(A), int(B))

D()

Submission status: Wrong Answer

Solution code:
import sys
from math import ceil, sqrt
def input(): return sys.stdin.readline().strip()


def main():
    X = int(input())
    x = int(X ** (1/5))
    if x == X ** (1/5):
        print("{} {}".format(x, 0))
        return
    
    for B in range(1, x + 1):
        A = (X - B**5) ** (1/5)
        if A < B: break
        if int(A) == A:
            print("{} {}".format(int(A), -B))
            return
    
    y = sqrt(x)
    if int(y) == y: upper = int(y) + 1
    else: upper = ceil(y)
    for d in range(1, upper):
        if X % d == 0:
            B = 1
            while (B + d) ** 5  < B ** 5 + X:
                B += 1
            if (B + d) ** 5 == B ** 5 + X:
                print("{} {}".format(B + d, B))
                return
            
            d = X // d
            while (B + d) ** 5  < B ** 5 + X:
                B += 1
            if (B + d) ** 5 == B ** 5 + X:
                print("{} {}".format(B + d, B))
                return



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x=int(input())
fifth_power=[0]*200
for i in range(200):
    fifth_power[i]=(i+1)**5
for i in range(200):
    t=x-fifth_power[i]
    if x==1:
        print(0,-1)
        break
    elif fifth_power.count(abs(t))==1:
        if abs(t)-fifth_power[i]==x:
            print(fifth_power.index(abs(t))+1,i+1)
            break
        else:
            print(fifth_power.index(abs(t))+1,-i-1)
            break

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(-10**4 - 10**3 - 10**4,1,2):
        for j in range(10**4 + 1 + 10**3,-10**4 - 10**3,-2):
            if i == j:
                continue
            if X % (i - j) == 0:
                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:
import math
x = int(input())

for i in range(-100,100):
  for j in range(-100,100):
    X = (i-j)*(i**4 + i**3*j + i**2*j**2 + i*j**3 + j**4)
    if X==x:
      print(i,j)
      exit()

Submission status: Wrong Answer

Solution code:
if __name__=='__main__':
    x = int(input())
    n = 0
    a,b = 0,0
    while x > n**5:
        n+=1
    for i in range(n):
        if n**5-i**5==x:
            print('{} {}'.format(n,i))
            break
        if (n-1)**5+i**5==x:
            print('{} {}'.format(n-1,-i))
            break
        if (n-1)**5-i**5==x:
            print('{} {}'.format(n-1,i))
            break
        if n**5+i**5==x:
            print('{} {}'.format(n,i))
            break

Submission status: Wrong Answer

Solution code:
X = int(input())
j = 1
for i in range(1,X//2+2):
  if X%i == 0:
    if i != 1:
      j = i
      break


a_b=j
tmp = X//i
for k in range(-100,100):
  b = -k
  a = a_b + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()
for k in range(-100,100):
  b = -k
  a = tmp + b
  if a**5 - b**5 == X:
    print(a,b)
    exit()

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

l = math.floor(math.log(abs(x), 5)) + 100

s = [i**5 for i in range(l)]

a, b = [0,0]

for i in range(l):
    for j in range(l):
        if s[i] +s[j] == x:
            a, b = i, -j
            break
        elif s[i] - s[j] == x:
            a, b = i, j
            break

print(str(a) + " " + str(b))

Submission status: Wrong Answer

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

def f(p,T):
    q=T//p
    #print(p,q)
    n=int(abs(p)**(1/2))+1
    for j in range(-n-1,n+1):
        i = j+p
        k=i**4 + i**3*j + (i**2) * (j**2) + i*(j**3)+(j**4)
        if (k==q):
            print(i,j)
            sys.exit()
T=int(input())
ya=make_divisors(T)
for p in ya:
    f(p,T)

Submission status: Wrong Answer

Solution code:
x = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

facts = factorization(x)

for fact in facts:
    c = fact[0]
    if (c-1)**5 + 1 == x or 1 - (c-1)**5 == x:
        print(c-1, -1)
        break
    elif c**5 == x:
        print(c, 0)
        break

Submission status: Wrong Answer

Solution code:
a = int(input())
for i in range(-10,10,1):
    for j in range(-10,10,1):
        if a == ((i**5) - (j**5)):
            print(i, j)
            break;
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
x = int(input())

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

    if lower != -1 and 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(-a-1, a+1):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

# 0, 0
print(0, 0)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal

X=Decimal(input())
ansa=0
ansb=0
for a in range(100):
    b5 = Decimal(a**5) - X
    sig = False
    if a==100:
        print()
    if b5 < 0:
        sig = True
        b5 = abs(b5)
    b1 = pow(b5,Decimal('0.2'))

    if sig:
        b1 *= -1

    if b1 == int(b1):
        ansa=a
        ansb=int(b1)
        break
print(ansa,ansb)

Submission status: Wrong Answer

Solution code:
x=int(input())
l=[]
for i in range(1,int(x**0.5)+1):
  if x%i==0:
    l.append(i)
    l.append(x//i)
for i in l:
  for j in range(int(i**0.2)+10,0,-1):
    A=j
    B=j-i
    if A**5-B**5==x:
      print(A,B,sep=' ')
      exit()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = n
flag = 0
 
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)
if ans == 1:
  a.append(1)

for i in range(10**4):
  x = i
  y = x-a[0]
  if x**5 - y**5 == ans:
    print(x,y)
    flag = 1
    break

if flag == 0:
  for i in range(-10000,0):
    x = i
    y = x-a[0]
    if x**5 - y**5 == ans:
      print(x,y)
      break

Submission status: Wrong Answer

Solution code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
 
    if temp!=1:
        arr.append([temp, 1])
 
    if arr==[]:
        arr.append([n, 1])
 
    return arr
X = int(input())
A = []
for i in factorization(X):
  for j in range(1,i[1]+1):
    a = i[0]**j
    b = X//a
    if(a<b):
      A.append([a,b])
    else:
      A.append([b,a])
 
A = list(map(list, set(map(tuple, A))))
flag = 0
for i in A:
  r = list(range(0,100000+1))
  for a in r:
    b = a - i[0]
    if a**4 + a**3 * b + a**2 * b**2 + a * b**3 + b**4 == i[1]:
      print(a,b)
      flag = 1
      break
  if flag==1:
    break
  r = list(range(0,100000+1))
  for a in r:
    b = a - i[1]
    if a**4 + a**3 * b + a**2 * b**2 + a * b**3 + b**4 == i[0]:
      print(a,b)
      flag = 1
      break
  if flag==1:
    break

Submission status: Wrong Answer

Solution code:
x = int(input())

num = [x ** 5 for x in range(-63, 63)]


for i in range(-63, 63):
    flag = False
    for j in range(-63, 63):
        tmp = i ** 5 - j ** 5
        if tmp == x:
            print('{} {}'.format(i, j))
            flag = True
            break
    if flag:
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
top = int(x**0.5)+1
A = 0
B = 0
flag = False

divs = []
for i in range(1, top):
    if x % i == 0:
        divs.append(i)

for d in divs:
    if flag:
        break
    for i in range(-2*d, 2*d+1):
        a = i
        b = a - divs[-1]
        if a**5 - b**5 == x:
            A = a
            B = b
            flag = True
            break

print(A, B)

Submission status: Wrong Answer

Solution code:
X = int(input())

for i in range(2,10**5):
    if i ** 5 - (i-1)**5 == X:
        print(i,i-1);exit()


for x in range(0,150):
    for y in range(-150,0):
        if x** 5 - y ** 5 == X:
            print(x,y);exit()

Submission status: Wrong Answer

Solution code:
X = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr
    
fact_ls = factorization(X)

flg = False
for f in fact_ls:
    for b in range(-999, 1000):
        a = b + f
        if (a ** 5 - b ** 5) == X:
            A = a
            B = b
            flg = True
            break
    if flg:
        break
else:
    A = 0
    B = 0

print(A, B)

Submission status: Wrong Answer

Solution code:
import math
def D():
    X = int(input())
    for x in range(X):
        A = math.pow(x, 5)
        B = A-X
        if B == 0 or math.log(abs(B), 5).is_integer():
            print(int(A), int(B))

Submission status: Wrong Answer

Solution code:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
#      .      '                    Udit Gupta @luctivud         ,              
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            ##     ##  #######  # #  ######
                            ##     ##  ##   ##  ###    ##
                            ##     ##  ##    #  # #    ##
                            #########  #######  # #    ##
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

import sys
import math as mt
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))

def printwsp(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end="tst, ")

MOD = int(1e9+7); BABYMOD = 998244353;
# ################################ HELPER PROGRAMS USED ###################################
# ################################## MAIN STARTS HERE #####################################
# for _testcases_ in range(int(input())):
x = int(input())
i = 0
se = set()
d = {}
while(True):
    num = i ** 5
    if num > 1e9 :
        break
    d[num] = i
    se.add(num)
    i += 1
# print(se)
for i in se:
    y = i + x
    if y in se:
        # print("s")
        a = max(d[i], d[y]) 
        b = min(d[i], d[y])
        print(a, b)
        break
    y = abs(i-x)
    if y in se:
        # a = max(d[i], d[y]) 
        # b = min(d[i], d[y])
        print(d[i], -d[y])
        break

# #########################################################################################
'''
THE LOGIC AND APPROACH WAS DEVELOPED BY ME @luctivud.
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
PLEASE DO NOT PLAGIARISE.
'''

Submission status: Wrong Answer

Solution code:
x = int(input())

min_limit = int(x**0.2) + 1

hashd = {}
a = 0
b = 0

for n in range(min_limit+1):
    p = n**5
    hashd[p] = n
    
    if p==x:
        a = n
        b = 0
        break
    else:
        if abs(x-p) in hashd.keys():
            a = n
            b = hashd[x-p]
            
            if (p+hashd[x-p]==x):
                b = -b

print(a,b)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
A = math.floor(X**(1/5))
tmp = X- (A **5)
B = math.floor(tmp**(1/5))
print(A,(B*-1))

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

l = math.floor(math.log(abs(x), 5)) + 10

s = [i**5 for i in range(l)]

a, b = [0,0]

for i in range(l):
    for j in range(l):
        if s[i] +s[j] == x:
            a, b = i, -j
            break
        elif s[i] - s[j] == x:
            a, b = i, j
            break

print(str(a) + " " + str(b))

Submission status: Wrong Answer

Solution code:
x = int(input())
a,b = 0,0
check = 0
for i in range(100):
    if check==1:
        break
    for j in range(100):
        if i**5 - j**5 == x:
            a,b = i,j
            check = 1
            break
        elif i**5 + j**5 == x:
            a,b = i,-j
            check = 1
            break
        
print(a,b)

Submission status: Wrong Answer

Solution code:
import sys

def debug(*args):
    print(*args, file=sys.stderr)

# https://www.themathpage.com/Alg/difference-two-squares-2.htm#fifth

# https://qiita.com/snow67675476/items/e87ddb9285e27ea555f8
def factorize(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def get_factors_of(a_number):
    factorized = factorize(a_number)
    return [factor for factor, _ in factorized]


x_diff_of_5th_factor = int(input())

factors_of_x = get_factors_of(x_diff_of_5th_factor)

# debug(factors_of_x)

for a_factor_of_x in factors_of_x:
    for a in range(a_factor_of_x//2+1):
        b = a - a_factor_of_x

        if a ** 5 - b ** 5 == x_diff_of_5th_factor:
            print('{} {}'.format(a, b))
            sys.exit(0)
print('0 0')
sys.exit(0)

Submission status: Wrong Answer

Solution code:
import sys
import math

X = int(input())

for A in range(math.ceil(X**(1 / 5))):
    B_5 = X - A**5
    B = B_5**(1 / 5)
    if math.floor(B) == B:
        print(A, -int(B))
        sys.exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
res1 = 0
res2 = 0
res = 0
i = 1 
j = 0
jmem = 1000
trouve = 0
while i < x:
    j = 0
    jmem = 1000
    while j < x:
        res1 = i**5
        res2 = j**5
        res = res1 - res2
        if res == x:
            trouve = 1
            break
        if j > 0:
            if res < x:
                jmem = j
                j += 1
            elif res > x:
                jmem = j
                j -= 1
        elif j <= 0:
            if res > x:
                if j+1 == jmem:
                    break
                jmem = j
                j += 1
            elif res < x:
                if j-1 == jmem:
                    break
                jmem = j
                j -= 1
        print(i,j)
        
    if trouve: 
        break
    else:
        i += 1

print(i, j)

Submission status: Wrong Answer

Solution code:
X=int(input())
ls=[-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10]
for i in ls:
    for j in ls:
      if i*i*i*i*i-j*j*j*j*j==X:
          print (i,j)

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,10**4 + 10**3 + 10**3,2):
        for j in range(10**4 + 1 + 10**3,-10**4 - 10**3,-2):
            if i == j:
                continue
            if X % (i - j) == 0:
                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:
import numpy as np

x = int(input())
k = 0
A = 0
B = 0
for i in range(0, 100):
    I = i**5
    j = I - x
    J = abs(j)
    k = 0
    while k <= J**(0.2):
        if k**5 == J:
            A = i
            B = k*(np.sign(j))
            break
        k += 1
print(str(A) + ' ' + str(B))

Submission status: Wrong Answer

Solution code:
N = int(input())
t = []
i=0
s=2
ans1 =0
ans2 =0
while (i**5<=10**10):
    t.append(i**5)
    i+=1
for j in t:
    if(N + j) in t:
        ans1 = j
        ans2 = N + j
        s = 0
        break
    elif(N-j) in t:
        ans1 = -j
        ans2 = N - j
        s = 1
        break
if(s==0):
    ans3 = t.index(j) 
    ans4 = t.index(ans2)
else:
    ans3 = (t.index(j))*(-1)
    ans4 = t.index(ans2)
print(ans4,ans3)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = n
flag = 0
 
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)
if ans == 1:
  a.append(1)

for i in range(10**2):
  x = i
  y = x-a[0]
  if x**5 - y**5 == ans:
    print(x,y)
    flag = 1
    break

if flag == 0:
  for i in range(-100,0):
    x = i
    y = x-a[0]
    if x**5 - y**5 == ans:
      print(x,y)
      break

Submission status: Wrong Answer

Solution code:
#input
X = int(input())

#output
import math
left = 1
right = 10**2
while left + 1 < right:
    mid = (left + right)//2
    if mid **5  > X:
        right = mid
    else:
        left = mid

A = right
C = A**5 -X

if C >= 0:
    B = pow(C, 1/5)
else:
    B = -pow(-C, 1/5)

for i in range(X):
    if B.is_integer():
        break
    else:
        A -= 1
        C = A**5 - X
        if C >= 0:
            B = pow(C, 1/5)
        else:
            B = -pow(-C, 1/5)

    print(A, int(B))

Submission status: Wrong Answer

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

for i in range(100):
  a = pow(i, 5)
  for j in range(i, 100):
    b = pow(j, 5)
    if a-b == x:
      print(i, j)
      sys.exit()
    elif a+b == x:
      print(i, -j)
      sys.exit()

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
for i in range(-math.ceil(x**0.2), math.ceil(x**0.2)):
    b = int(i**5 - x)
    if b > 0:
        b = b**0.2
    else:
        b = -((-b)**0.2)
    try:
        if b % 1 == 0:
            print(i, int(b))
            break
    except:
        pass

Submission status: Wrong Answer

Solution code:
a=[i for i in range(-70,71)]
x=int(input())
for i in range(len(a)):
    c=1
    for j in range(len(a)):
        # print(pow(a[i],5)-pow(a[j],5))
        t=pow(a[i],5)-pow(a[j],5)
        if i!=j and (t==x):
            print(a[i],a[j])
            c=0
            break
        elif i!=j and (t==-x):
            print(a[j],a[i])
            c=0
            break
    if(c==0):
        break

Submission status: Wrong Answer

Solution code:
X = int(input())
i=0
while(True):
  B =  i**5 - X
  if B<0:
    powB = pow(-B,0.2)
    if(float.is_integer(powB)):
      print(str(i)+" "+str(int(-powB)))
      break
  else:
    powB = pow(B,0.2)
    if(float.is_integer(powB)):
      print(str(i)+" "+str(int(powB)))
      break
  B =  (-i)**5 - X
  if B<0:
    powB = pow(-B,0.2)
    if(float.is_integer(powB)):
      print(str(i)+" "+str(int(-powB)))
      break
  else:
    powB = pow(B,0.2)
    if(float.is_integer(powB)):
      print(str(i)+" "+str(int(powB)))
      break
  i+=1

Submission status: Wrong Answer

Solution code:
import math, sys
X = int(input())
sX = math.floor(math.sqrt(X))
AandB = []
AandB.append(-X)
for x in range(-sX,sX+1):
    if x==0:
        continue
    if X%x == 0:
        AandB.append(x)
AandB.append(X)
for a_b in AandB:
    b = a_b//2
    flag = True
    while flag:
        a = a_b - b
        if a**5-b**5==X:
            print(str(a)+" "+str(b))
            sys.exit()
        elif a**5-b**5>X:
            flag = False
        b-=1