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:
#保証されている
#分解するとa<10**3となる

x=int(input())

for b in range(10**3):
    a = int((x+b**5)**(1/5))
    for i in range(a-1,a+3):
        if i**5+b**5==x:
            print(i,-b)
            exit()
for b in range(10**3):
    a2=(x-b**5)
    if a2<0:
        continue
    a = int(a2**(1/5))
    
    for i in range(a-1,a+3):
        if i**5-b**5==x:
            print(i,b)
            exit()

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
for i in range(1,101):
	a5 = pow(i,5)
	b5 = abs(x - a5)
	b = pow(b5,1/5)
	if math.floor(pow(b5, 1/5)) == math.ceil(pow(b5, 1/5)):
		exit(print(int(b) , -i))

Submission status: Wrong Answer

Solution code:
from math import sqrt,ceil,floor
def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())


x=ii()


for i in range(100000):
    x3=x-pow(i,5)
    x2=abs(x3)
    x1=x2**(1/5)
    if(x1==int(x1)):
        x1=int(x1)
        if(x3>0):
            x1*=(-1)
        print(i,x1)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = (-1,-1)
gojo = [i**5 for i in range(100)]
for i in range(100):
    for j in range(100):
        if gojo[i]+gojo[j]==x:
            ans = (i,-j)
        if gojo [i]- gojo[j]==x:
            ans = (i,j)
        
print(ans[0],ans[1])

Submission status: Wrong Answer

Solution code:
x=int(input())
x5=[i**5 for i in range(0,10**2+1,1)]
for i in range(len(x5)):
    for j in range(len(x5)):
        if x5[i]-x5[j]==x:
            print(i,j)
            exit()
        if -x5[i]+x5[j]==x:
            print(-i,-j)
            exit()
        if x5[i]+x5[j]==x:
            print(i,-j)
            exit()
        if -x5[i]-x5[j]==x:
            print(-i,j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

five_pows = []
for i in range(80):
    five_pows.append(i**5)

flag = 0
for i in range(80):
    if flag:
        break
    for j in range(i, 80):
        if five_pows[j] - five_pows[i] == x:
            flag = 1
            print(j, i)
            break
        elif five_pows[j] + five_pows[i] == x:
            flag = 1
            print(j, -i)
            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=0
    while True:
        b=abs(a**5-x)**(1/5)
        if int(b)==b:
            if a**5-x<0:
                b=-b
            print(a,math.ceil(b))
            break
        a+=1

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X = int(input())
d = []
for i in range(1,int(X**0.5)+1):
    if X%i==0:
        d.append(i)
        d.append(X//i)
d = list(set(d))
d.sort()

for k in d:
    flag = False
    for A in range(1,10**9):
        B = A-k
        if A**5-B**5==X:
            flag = True
            break
        if A**5-B**5>X:
            break
    if flag:
        break
print(A,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(a, b)
      exit()

Submission status: Wrong Answer

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

for i in range(101):
  for j in range(-100,101,1):
    if i**5-j**5 ==x:
      a = i
      b = j
      break
print(a,b)

Submission status: Wrong Answer

Solution code:
X = int(input())

def calc():
    for A in range(-100, 101, 1):
        for B in range(-100, 101, 1):
            if pow(A, 5) - pow(B, 5) == X:
                print(A, B)
                return

calc()

Submission status: Wrong Answer

Solution code:
#保証されている
#分解するとa<10**3となる

x=int(input())

for b in range(10**3):
    a = int((x+b**5)**(1/5))
    for i in range(a-1,a+2):
        if i**5+b**5==x:
            print(i,-b)
            exit()
for b in range(10**3):
    a2=(x-b**5)
    if a2<0:
        continue
    a = int(a2**(1/5))
    
    for i in range(a-1,a+3):
        if i**5-b**5==x:
            print(i,b)
            exit()
    if b==1:
        print(a,b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(100):
    for u in range(-100,100):
        if i**5-u**5==X:
            print(i,u)
            exit()
        else:
            pass

Submission status: Wrong Answer

Solution code:
X = int(input())

for i in range(10**2):
    for j in range(-10**2,10**2):
        if i**5 - j**5 ==X:
            print(i,j)
            break

Submission status: Wrong Answer

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    X=int(readline())
    i=0
    li=[0]
    while True:
        i+=1
        if i**5>=3*X:
            break
        li.append(i)
        li.append(-1*i)
    
    flag=False
    for A in li:
        for B in li:
            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())
for i in range(50):
    if i**5-x>0: y = (i**5-x)**(1/5)
    else: y = -((x-i**5)**(1/5))
    if y%1==0:
        print(i, int(y))
        break

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

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

Submission status: Wrong Answer

Solution code:
X = int(input())
L = [i ** 5 for i in range(0, 500)]
for i in L:
    for j in L:
        if i + j == X:
            print(int(i**0.2), int(j**0.2))
            exit()
        if i - j == X:
            print(int(i**0.2), -int(j**0.2))
            exit()
        if -i + j == X:
            print(-int(i**0.2), int(j**0.2))
            exit()
        if -i - j == X:
            print(-int(i**0.2), -int(j**0.2))
            exit()

Submission status: Wrong Answer

Solution code:
import numpy as np
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    x=INT()
    flg=0
    for i in range(1,101):
        if x%i==0:
            temp=int(x/i)
            #print(str(temp)+'aaa')
            for k in range(101):
                a=k
                b=a-i
                ans=a**4+(a**3)*b+(a**2)*(b**2)+a*(b**3)+b**4
                if temp==ans:
                    print(a,b)
                    flg=1
                    break
        if flg==1:
            break
                    
                
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

Solution code:


r=[]
for i in range(128):
    A=i-63
    for j in range(128):
        B=j-63
        r.append((A**5-B**5,A,B))
r.sort()

target=int(input())
lwbd = 0
upbd = len(r)

while lwbd<upbd:
    middle = lwbd+ (upbd-lwbd)//2
    if(r[middle][0]==target):
        break
    elif r[middle][0]>target:
        upbd = middle
    else:
        lwbd = middle
print(r[middle][0],r[middle][1],r[middle][2])

Submission status: Wrong Answer

Solution code:
x = int(input())

def search(x: int) -> (int, int):
    for a in range(-100, 101):
        for b in range(-100, 101):
            if a ** 5 - b ** 5 == x:
                return (a, b)
    return (-100, -100)

a, b = search(x)
print(f"{a} {b}")

Submission status: Wrong Answer

Solution code:
x = int(input())

ok = False
for a in range(101):
    for b in range(-100, 101):
        if a**5 - b**5 == x:
            print("%d %d" % (a, b))
            ok = True
        if ok:
            break
    if ok:
        break

Submission status: Wrong Answer

Solution code:
X = int(input())

memo = []
A = 0
while True:
    A += 1
    A5 = A ** 5
    memo.append(A5)
    if A5 > X:
        try:
            i = memo.index(A5 - X)
        except ValueError:
            continue
        else:
            B = i
            break
    else:
        try:
            i = memo.index(X - A5)
        except ValueError:
            continue
        else:
            B = -i
            break

print(A, B)

Submission status: Wrong Answer

Solution code:
x = int(input())
b = -1
a = int((b**5+x)**1/5)
while a %1 != 0 :
    b+= 1
print(int(a),int(b))

Submission status: Wrong Answer

Solution code:
X = int(input())

for A in range(0,10**8):
    a = A**5
    if a < X:
        if (X-a)**(1/5) == int((X-a)**(1/5)):
            print(A,-int((X-a)**(1/5)))
            exit()
    else:
        if (a-X)**(1/5) == int((a-X)**(1/5)):
            print(A,int((a-X)**(1/5)))
            exit()

Submission status: Wrong Answer

Solution code:
X=int(input())
for a in range(201):
 for b in range(401):
  if a**5-(b-200)**5==X:
   x=str(a)
   y=str(b)
L=[x,y]
L=' '.join(L)
print(L)

Submission status: Wrong Answer

Solution code:
X = int(input())

FIVES = [(x+1) ** 5 for x in range(200)]

for ki,vi in enumerate(FIVES):
    for kj,vj in enumerate(FIVES):
        if ki > kj and vi - vj == X:
            print(ki+1,kj+1)
            exit()
        if vi + vj == X:
            print(ki+1,-(kj+1))
            exit()

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    X = int(rl())
    
    a = int(pow(X, 1./5.))
    b = int(pow(X - pow(a, 5), 1./5.))
    print(a, -b)


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

x = ni()
def sol():
    for i in range(-70, 71):
        for j in range(-70, 71):
            if (i ** 5) - (j ** 5) == x:
                print(i, j)
                return

sol()

Submission status: Wrong Answer

Solution code:
import numpy as np

def divisors(M):#Mの約数列 O(n^(0.5+e))
    import math
    d=[]
    i=1
    while math.sqrt(M)>=i:
        if M%i==0:
            d.append(i)
            if i**2!=M:
                d.append(M//i)
        i=i+1
    d.sort()
    return d

X=int(input())
d=divisors(X)
for i in d:
    k=i
    data=np.roots([5,10*k,10*k**2,5*k**3,k**4-X//k])
    for s in data:
        x=int(s)
        if 5*x**4+10*k*x**3+(10*k**2)*x**2+(5*k**3)*x+k**4==X//k:
            print(k+x,x)
            exit()

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())
result = [1,1]
for i in range(10**3+1):
    for j in range(10**3+1):
        if x == pow(i, 5)+pow(j, 5):
            result = [i, -j]
            print(*result)
            sys.exit()
print(*result)

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
MAX = 2*(10**9)
MOD = 10**9+7
M = [0]
i = 1
while i**5 <= MAX:
  M.append(i)
  i+=1
#print(M)
  
for i in M:
  for j in M:
    for m in [-1, 1]:
      for n in [-1, 1]:
        ifi = m * (i**5)
        ifi %= MOD
        jfi = n * (j**5)
        jfi %= MOD
        if (ifi)%MOD == (X+jfi)%MOD:
          print(i*m, j*n)
          sys.exit(0)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi

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())

d5=[0]*(101)
for i in range(101):
    d5[i]=i**5


for i in range(101):
    for j in range(101):
        ans1=d5[i]-d5[j]
        if ans1==X:
            print(i,j)
            exit()
        ans2=d5[i]+d5[j]
        if ans2==X:
            print(i,(-1)*j)
            exit()

Submission status: Wrong Answer

Solution code:
x = int(input())

f5=list()

i=0
while i**5<=10**9+6:
    f5.append(i**5)
    i+=1
a=0
b=0
for i in range(len(f5)):
    for j in range(len(f5)):
        if f5[i] - f5[j]==x:
            a=i
            b=j
            break
        if f5[i] + f5[j]==x:
            a=i
            b=-j
            break 

print(a,b)

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    sys.setrecursionlimit(10**6)
    input = sys.stdin.readline
    X = int(input())
    for a in range(-63, 64):
        for b in range(-63, 64):
            if a ** 5 - b ** 5 == X:
                print(a, b)
                exit()


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())
flag = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
import itertools
for a,b in itertools.product(range(-10,11),repeat=2):
    if x==a**5-b**5:
        print(a,b)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())

ansl = []
for i in range(-100, 100):
    ansl.append(i**5)

for i in range(200):
    for j in range(i+1, 200):
        if ansl[j] - ansl[i] == x:
            print(j-100, i-100)
            exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
a=0
b=64

while True:
  t=a**5+b**5
  if t==x:
    break
  if t>x:
    b-=1
  else:
    a+=1
print(a,b)

Submission status: Wrong Answer

Solution code:
from sys import exit

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

Submission status: Wrong Answer

Solution code:
L=[]
for i in range(1,100):
    if i**5 <= 10**9:
        L.append([i**5,i])
#print(len(L))
M=[]
for i,j in L:
    M.append([-i,-j])
List=M+[[0,0]]+L
#print(List)

X=int(input())

for a,b in List:
    for c,d in List:
        if a-c==X:
            print(b,d)
            exit()

Submission status: Wrong Answer

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

a=-1000
while a**5<=x:
    b=math.pow(a,5)-x
    bb=b
    b=math.pow(abs(b),1/5)
    if bb<0:
        b=-b
    if b==int(b):
        b=int(b)
        print(a,b)
        break
    a+=1

Submission status: Wrong Answer

Solution code:
x = int(input())
d = dict()
for i in range(-100, 101):
	d[i**5] = i
for i in d:
	if x+i in d:
		print(d[x+i], d[i])
		break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())
    x1=int(x**(1/5))+1
    a=0
    while a<=x1:
        b=abs(a**5-x)**(1/5)
        if int(b)==b:
            if a**5-x<0:
                b=-b
            print(a,int(b))
            break
        a+=1

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())
result = [1,1]
for i in range(10**2+1):
    for j in range(10**2+1):
        if x == pow(i, 5)+pow(j, 5):
            result = [i, -j]
print(*result)

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
MAX = 10**9
MOD = 10**9+7
M = [0]
i = 1
while i**5 <= MAX:
  M.append(i)
  i+=1
#print(M)
  
for i in M:
  for j in M:
    for m in [-1, 1]:
      for n in [-1, 1]:
        ifi = m * (i**5)
        ifi %= MOD
        jfi = n * (j**5)
        jfi %= MOD
        if (ifi)%MOD == (X+jfi)%MOD:
          print(i*m, j*n)
          sys.exit(0)

Submission status: Wrong Answer

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

B = -math.floor(math.pow(X, 0.2))
for b in range(B, 1000):
    tmp = math.pow(X + b ** 5, 0.2)
    if int(int(tmp) - tmp) == 0:
        break
        
tmp = int(tmp)
if abs(b) > tmp:
    A = -b
    B = -tmp
else:
    A = tmp
    B = b
print(A, B)

Submission status: Wrong Answer

Solution code:
Five = [a**5 for a in range(120)]
X = int(input())
clear = 0
for o in range(119):#i<j
    for p in range(o+1,120):
        i = Five[o]
        j = Five[p]
        if j - i == X:
            print(f"{p} {o}")
            clear = 1
        if j + i == X:
            print(f"{p} {-o}")
            clear = 1
    if clear:break

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(X: int):

    # 和で表現される場合
    upper = int(X**(1/5))+1
    for a in range(upper+1):
        for b in range(a, upper+1):
            if X == a**5+b**5:
                print(a, -b)
                return
    # 差で表現される場合
    upper = 120
    for a in range(upper+1):
        for b in range(a, upper+1):
            if X == a**5-b**5:
                print(a, b)
                return
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    X=int(readline())
    i=0
    li=[0]
    while True:
        i+=1
        li.append(i)
        li.append(-1*i)
        if i**5>=X:
            break
    
    flag=False
    for A in li:
        for B in li:
            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:
# import numpy as np
# import queue
# import heapq


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


def r(a, b):
    return (a ** 4) + ((a ** 3) * b) + ((a ** 2) * (b ** 2)) + (a * (b ** 3)) + (b ** 4)


def main():
    print(*solve())


def solve():
    X = int(input())
    facts = factorization(X)

    f0 = facts[0][0]
    f1 = X // f0

    for a in range(10**7):
        b = f0 + a
        if r(a, b) == f1:
            return a, b

        a = -a
        b = f0 + a
        if r(a, b) == f1:
            return a, b


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())

for a in range(-100,101):
    for b in range(-100,101):
        if (a**5-b**5) == X:
            print(str(a)+" "+str(b))
            sys.exit()

Submission status: Wrong Answer

Solution code:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import defaultdict
from sys import exit
import math

from bisect import  bisect_left
def main():
    x = getN()
    ruis = [i**5 for i in range(-100000, 100000)]
    # print(ruis)
    for a in ruis:
        b = a - x
        if b > ruis[-1]:
            continue
        idx = bisect_left(ruis, b)
        if ruis[idx] == b:
            # print(a, b, x, idx)
            print(a , idx - 100000)
            return

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    X = int(input())
    for A in range(-50, 51):
        for B in range(-50, 51):
            if A**5 - B**5 == X:
                print(A, B)
                exit()
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())
d = dict()
for i in range(-100, 101):
	d[i**5] = i
for i in d:
	if x+i in d:
		print(d[i], d[x+i])
		break

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(10000):
    b = abs(i**5-x)
    if (b**0.2)%1 == 0:
        if i**5 >= x:
            print(i,int(b**0.2))
        else:
            print(i,-int(b**0.2))
        exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
a=0
b=0
for i in range(-x//4,x//4):
  for j in range(-x//4,x//4):
    if i**5-j**5==x:
      a=i
      b=j
print(a),print(b)

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
MOD = 1000000007

X = int(input())

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

Submission status: Wrong Answer

Solution code:
x = int(input())
for a in range(-100, 101):
    p = a ** 5
    l, r = -1000, 1001
    while r - l > 1:
        m = (l + r) // 2
        if m ** 5 <= p - x:
            l = m
        else:
            r = m
    if l ** 5 == p - x:
        print(p, l)
        exit(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
mem = dict()

for i in range(101) :
    a = pow(i, 5)
    if X == a*2 :
        print(-i, i)
        break
    if a in mem :
        print ( i, mem[a] )
        break

    mem[X-a] = -i
    mem[X+a] = +i

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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 ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

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

Submission status: Wrong Answer

Solution code:
X = int(input())

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

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(B_,-5))
        if(B**5==B_):
            print(A,B)
            return
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())


def ab(x):
    for a in range(70):
        for b in range(70):
            if a ** 5 + b ** 5 == x:
                return (a, -b)

    for a in range(200):
        for b in range(a):
            if a ** 5 - b ** 5 == x:
                print(a, b, 'aaa')
                return (a, b)

a, b = ab(x)
print(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
from bisect import bisect_left,bisect_right
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    X=int(input())
    l=[i**5 for i in range(100)]
    for i,a in enumerate(l):
        for j,b in enumerate(l):
            if a+b==X:
                print(j,-i)
                exit()
            elif a-b==X:
                print(j,i)
                exit()
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
MAX = 10**9
MOD = 10**9+7
M = [0]
i = 1
while i**5 <= MAX:
  M.append(i)
  i+=1
#print(M)
  
for i in M:
  for j in M:
    for m in [-1, 1]:
      for n in [-1, 1]:
        ifi = m * (i**5)
        ifi %= MOD
        jfi = n * (j**5)
        jfi %= MOD
        if (ifi - jfi)%MOD == X%MOD:
          print(i*m, j*n)
          sys.exit(0)

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:
x = int(input())
for a in range(-100, 101):
    p = a ** 5
    l, r = -1000, 1001
    while r - l > 1:
        m = (l + r) // 2
        if m ** 5 <= x - p:
            l = m
        else:
            r = m
    if l ** 5 == x - p:
        print(p, l)
        exit(0)

Submission status: Wrong Answer

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

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

def main():
    mod=10**9+7
    X=I()
    
    flag=0
    
    for a in range(100):
        if flag==1:
            break
        for b in range(100):
            aa=pow(a,5)
            bb=pow(b,5)
            if aa-bb==X:
                print(a,b)
                flag=1
                break
            
            if aa+bb==X:
                print(a,-1*b)
                flag=1
                break
                

main()

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
    return(int(input().rstrip()))
def inlt():
    return(list(map(int,input().rstrip().split())))
def insr():
    s = input().rstrip()
    return(s[:len(s) - 1])
def invr():
    return(map(int,input().rstrip().split()))
################################################################
x = inp()
a,b = 0,0
has = False
for i in range(1000):
    for j in range(100,-1000,-1):
        if i**5 - j**5 == x:
            a,b = i,j
            has = True
            break
    if has:
        break
print(a,b)