ZhenlongDai/ACPR huggingface dataset:
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
print((10000-n)*1000)


Failing test case input:
1021

Expected output:
979


Actual output:
8979000


Fixed submission (verdict: Accepted):
n = int(input())
print((10000-n)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = n / 1000
if int(a) == a:
	print('0')
else:
	a = int(a) + 1
	a = a * 1000


Failing test case input:
721

Expected output:
279


Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
a = n / 1000
if int(a) == a:
	print('0')
else:
	a = int(a) + 1
	a = a * 1000
	print(a-n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n = Ii()
print(n%1000)

Failing test case input:
3154

Expected output:
846


Actual output:
154


Fixed submission (verdict: Accepted):
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))
n = Ii()
a = n%1000
if a == 0:
  print(0)
else:
  print(1000-a)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
i = int(input())
while (i >= 0):
  i -= 1000
print(i + 1000)

Failing test case input:
660

Expected output:
340


Actual output:
660


Fixed submission (verdict: Accepted):
i = int(input())
while (i > 0):
  i -= 1000
print(abs(i))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
while n >= 1000:
    n -= 1000
print(1000-n)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
while n >= 1000:
    n -= 1000
if n != 0:
    n=1000-n
print(n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
print(1000 - n % 1000)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
print((1000 - n % 1000) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
print(n%1000)

Failing test case input:
490

Expected output:
510


Actual output:
490


Fixed submission (verdict: Accepted):
n=int(input())
print((1000-n%1000)%1000)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
c=n%1000
print(1000-c)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n=int(input())
c=n%1000
if c==0:
    c=1000
print(1000-c)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
N = int(input())
print(int(math.ceil(N / 1000) * 1000))

Failing test case input:
1014

Expected output:
986


Actual output:
2000


Fixed submission (verdict: Accepted):
import math
N = int(input())
print(int(math.ceil(N / 1000) * 1000) - N)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
d = int(N % 1000)
print(1000 - d)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
print((1000 - N % 1000) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

print(min(0, 1000 - N % 1000))

Failing test case input:
1014

Expected output:
986


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())

print((1000 - N % 1000) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=int(input())
while a>=1000:
  a-=1000
print(a)  
  
  

Failing test case input:
1698

Expected output:
302


Actual output:
698


Fixed submission (verdict: Accepted):
a=int(input())
while a>1000:
  a-=1000
print(1000-a)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
pay = 0
while N <= pay:
  pay += 1000
  
print(pay -N)

Failing test case input:
1900

Expected output:
100

Actual output:
-1900


Fixed submission (verdict: Accepted):
N = int(input())
pay = 0
while N > pay:
  pay += 1000
print(pay-N)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=int(input())
print(a%1000)

Failing test case input:
636

Expected output:
364


Actual output:
636


Fixed submission (verdict: Accepted):
a=int(input())
print((1000-a%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
rl = sys.stdin.buffer.readline

N = int(rl())

print(1000 - (N % 1000))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):

import sys
rl = sys.stdin.buffer.readline

N = int(rl())

print((1000 - (N % 1000)) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


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


def main():
    N = int(input())
    print(N % 1000)


if __name__ == "__main__":
    main()


Failing test case input:
1698

Expected output:
302


Actual output:
698


Fixed submission (verdict: Accepted):
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


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


def main():
    N = int(input())
    if N % 1000 == 0:
        print(0)
    else:
        print(1000 - N % 1000)


if __name__ == "__main__":
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(int(input())%1000)


Failing test case input:
769

Expected output:
231


Actual output:
769


Fixed submission (verdict: Accepted):
print((1000-int(input())%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
price = int(input())
mult, res = divmod(price, 1000)
answer = 1000 - res
print(answer)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
price = int(input())
mult, res = divmod(price, 1000)
print(0 if res == 0 else 1000 - res)
Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def main():
    import sys
    N=int(sys.stdin.readline())
    print(1000-N%1000)

main()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
def main():
    import sys
    N=int(sys.stdin.readline())
    if N%1000:
        print(1000-N%1000)
    else:
        print(0)

        
main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())



if(n == 10000):
    print(0)
else:  
    print(1000-n%1000)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())



if(n == 10000):
    print(0)
elif(n%1000 == 0):
    print(0)
else:  
    print(1000-n%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
while N >= 1000:
  N = N - 1000
print(N)

Failing test case input:
2651

Expected output:
349


Actual output:
651


Fixed submission (verdict: Accepted):
N = int(input())
while N > 1000:
  N = N - 1000
N = 1000 - N
print(N)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math
price = int(input())
 
comma_price = math.ceil(price / 1000)
comma_price *= 1000
print(comma_price)
 
print(comma_price - price)

Failing test case input:
660

Expected output:
340


Actual output:
1000
340


Fixed submission (verdict: Accepted):
import math
price = int(input())
 
comma_price = math.ceil(price / 1000)
comma_price *= 1000
 
print(comma_price - price)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
n = 1000
while N > n:
    n += 1000
print(N - n)

Failing test case input:
504

Expected output:
496


Actual output:
-496


Fixed submission (verdict: Accepted):
N = int(input())
n = 1000
while N > n:
    n += 1000
print(n - N)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
print(N%1000)

Failing test case input:
2651

Expected output:
349


Actual output:
651


Fixed submission (verdict: Accepted):
N = int(input())
print((1000-N%1000)%1000)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
print(int(input())%1000)

Failing test case input:
1361

Expected output:
639


Actual output:
361


Fixed submission (verdict: Accepted):
print(-int(input())%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = n%1000
if a == 1000:
  print(0)
else:
  print(a)

Failing test case input:
504

Expected output:
496


Actual output:
504


Fixed submission (verdict: Accepted):
n = int(input())
a = n%1000
if a == 0:
  print(0)
else:
  print(1000 - a)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
i = int(input())
if i % 1000:
	print(0)
else:
	print(1000-(i % 1000))

Failing test case input:
636

Expected output:
364


Actual output:
0


Fixed submission (verdict: Accepted):
i = int(input())
if i % 1000 == 0:
	print(0)
else:
	print(1000-(i % 1000))
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
print(1000 - n % 1000)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
print((1000 - n % 1000) % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=int(input())

y=x%1000

print(1000-y)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
x=int(input())

y=x%1000

if y==0:
  y=1000

print(1000-y)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
money=int(input())
divide=money%1000
print(1000-divide)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
money=int(input())
divide=money%1000
if(divide==0):
	print(0)
else:
	print(1000-divide)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
print(1+(N/1000))

Failing test case input:
645

Expected output:
355


Actual output:
1.645


Fixed submission (verdict: Accepted):
print((10000-int(input()))%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n = int(input())
a = 0
while(a < n):
    a += 1000
print(a)

Failing test case input:
3520

Expected output:
480


Actual output:
4000


Fixed submission (verdict: Accepted):

n = int(input())
a = 0
while(a < n):
  a += 1000
print(a-n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


def main():

    N = int(input())

    ans = 1000 - (N % 1000)

    print(ans)


if __name__ == "__main__":
    main()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):


def main():

    N = int(input())

    if N % 1000 == 0:
        ans = 0

    else:
        ans = 1000 - (N % 1000)

    print(ans)


if __name__ == "__main__":
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(int(input())%1000)

Failing test case input:
975

Expected output:
25


Actual output:
975


Fixed submission (verdict: Accepted):
print((1000-int(input())%1000)%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
k=n%1000
if(k>=500):
  print(1000-k)
else:
  print(k)

Failing test case input:
490

Expected output:
510


Actual output:
490


Fixed submission (verdict: Accepted):
n=int(input())
a=n%1000
if(a!=0):
    print(1000-a)
else:
    print(0)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
  N = input()
  if len(N)<4:
    print(int(N))
  else:
    print(int(N[len(N)-2:]))

if __name__ == "__main__":
    main()

Failing test case input:
504

Expected output:
496


Actual output:
504


Fixed submission (verdict: Accepted):
def main():
  N = input()
  if int(N)%1000==0:
    print("0")
    return
  if len(N)<4:
    print(1000 - int(N))
  else:
    print(1000 - int(N[len(N)-3:]))

if __name__ == "__main__":
    main()
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=int(input())
from math import ceil
x=ceil(x/1000)*1000
print(x)

Failing test case input:
3000

Expected output:
0

Actual output:
3000


Fixed submission (verdict: Accepted):
x=int(input())
from math import ceil
u=ceil(x/1000)*1000
print(u-x)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):









def main():
    n = int(input())
    print(1000 - n%1000)
if __name__ == '__main__':
    main()

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):









def main():
    n = int(input())
    print((1000 - n%1000)%1000)
    
if __name__ == '__main__':
    main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()[-3:]
print(1000 - int(a))

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
a = input()[-3:]
print(0 if a == "000" else 1000 - int(a))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()    
amari  = int(a) % 1000
otsuri = 1000 - amari
print(otsuri)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
a = input()
amari = int(a)%1000
otsuri = 1000 - amari
if otsuri == 1000:
  otsuri = 0

print(otsuri)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import deque
import math
import os
import random
import re
import sys



def main():
	yen=100
	din=int(input())
	restante= din -yen
	if din != 1000*3:
		print(din-restante)
	else:
		print('0')
		
main()


 





Failing test case input:
769

Expected output:
231


Actual output:
100


Fixed submission (verdict: Accepted):
from collections import deque
import math
import os
import random
import re
import sys



def main():
	n=int(input())
	change = n%1000
	if change:
		print(1000-change)
	else:
		print(0)
		
	
main()

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
if N == 0:
  print('0')
else:
  print(N%1000)

Failing test case input:
2807

Expected output:
193


Actual output:
807


Fixed submission (verdict: Accepted):
N = int(input())
if N == 0 or N%1000 == 0:
  print('0')
else:
  print(1000 - N%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
d=n/1000
x=round(d,0)
c=int((x*1000)-n)
print(c)
    


Failing test case input:
1021

Expected output:
979


Actual output:
-21


Fixed submission (verdict: Accepted):
import math
n=int(input())
d=n/1000
x=math.ceil(d)
c=int((x*1000)-n)
print(c)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
ans = N % 1000
print(ans)

Failing test case input:
1900

Expected output:
100

Actual output:
900


Fixed submission (verdict: Accepted):
N = int(input())
ans = 1000 - (N % 1000)
print(ans % 1000)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
input1 = int(input())
while input1 > 999:
    input1 -= 1000
print(1000 - input1)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
input1 = int(input())
while input1 > 1000:
    input1 -= 1000
print(1000 - input1)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

if x % 1000 == 0:
    print(0)
else:
    x = str(x)
    y = x[-3:]
    y = int(y)
    if y >= 500:
        print(1000 - int(y))
    else:
        print(y)


Failing test case input:
1014

Expected output:
986


Actual output:
14


Fixed submission (verdict: Accepted):
x = int(input())

if x % 1000 == 0:
    print(0)
else:
    x = str(x)
    y = x[-3:]
    y = int(y)
    print(1000 - int(y))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
if N % 1000:
    print(1000)
else:
    print(1000 - N % 1000)

Failing test case input:
2651

Expected output:
349


Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())

if n % 1000 == 0:
  print(0)
else:
  print(1000 - n % 1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
print((n-(n%1000))%1000)

Failing test case input:
3264

Expected output:
736


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
print((1000-(n%1000))%1000)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
count = 0
money = 1000
while N >= money * count:
    count += 1
print(money * count - N)


Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
N = int(input())
count = 0
money = 1000
while N > money * count:
    count += 1
print(money * count - N)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

N = int(input())
a = N % 1000
if N <1000 :
    ans = 1000- a
elif a >=500:
    ans = 1000 - a
else:
    ans = a

print(ans)

Failing test case input:
3154

Expected output:
846


Actual output:
154


Fixed submission (verdict: Accepted):

N = int(input())
a = N % 1000
if N < 1000 :
    ans = 1000- a

elif a == 0:
    ans = 0
elif a < 500:
    ans = 1000 - a

else:
    ans = 1000-a

print(ans)

Problem: p02612
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
c = 0
while c <= n:
    c+=1000
print(c-n)

Failing test case input:
3000

Expected output:
0

Actual output:
1000


Fixed submission (verdict: Accepted):
n = int(input())
c = 0
while c < n:
    c+=1000
print(c-n)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
amount = int(input())
if(amount % 1000 == 0):
  print(0)
else:
  change = (amount / 1000 + 1) * 1000 - amount
  print(change)

Failing test case input:
769

Expected output:
231


Actual output:
1000.0000000000002


Fixed submission (verdict: Accepted):
amount = int(input())
if(amount % 1000 == 0):
  print(0)
else:
  change = (amount 
  print(change)
Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
N = int(input())

ans = 0
if N % 1000 == 0:
    ans = 0
else:
  ans = N % 1000
  
print(ans)



Failing test case input:
1698

Expected output:
302


Actual output:
698


Fixed submission (verdict: Accepted):
import sys
N = int(input())

ans = 0
if N % 1000 == 0:
  ans = 0
else:
  ans = 1000 - (N % 1000)

print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = n -( n % 1000)
print(ans)

Failing test case input:
769

Expected output:
231


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())

ans = (1000 - n%1000)%1000

print(ans)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
if (N%1000)>=500:
  print(1000-(N%1000))
else:
  print((N%1000))

Failing test case input:
1361

Expected output:
639


Actual output:
361


Fixed submission (verdict: Accepted):
N=int(input())
if (N%1000)==0:
  print(0)
else:
  print(1000-(N%1000))

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
amount = int(input())

x = 1000



while True:
    if x < amount:
        x += 1000
    else:
        break
print(x)    
print(x - amount)



    


Failing test case input:
1054

Expected output:
946


Actual output:
2000
946


Fixed submission (verdict: Accepted):
amount = int(input())

x = 1000



while True:
    if amount == 0:
        x = 0
        break
    if x < amount:
        x += 1000
    else:
        break
 
print(x - amount)

Problem: p02612
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
payment = abs(n - round(n / 1000) * 1000)
print(payment)

Failing test case input:
1054

Expected output:
946


Actual output:
54


Fixed submission (verdict: Accepted):
import math
n = int(input())
payment = abs(n - math.ceil(n / 1000) * 1000)
print(payment)
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for a in range(300):
  for b in range(300):
    if a**5-b**5==x or a**5+b**5==x:
      print(a,b)
      break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3
3 1


Fixed submission (verdict: Accepted):
x = int(input())
for a in range(300):
  for b in range(300):
    if a**5-b**5==x:
      print(a,b)
      exit()
    if a**5+b**5==x:
      print(a,b*-1)
      exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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

Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


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

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())
for i in range(-10**5, 10**5):
    if (x + i**5) < 0:
        flag = '-'
    else:
        flag = '+'
    A_tmp = abs(x + i**5)**(1/5)
    
    
    
    if A_tmp == int(A_tmp):
        A = int(A_tmp)
        B = i
        if flag == '-':
            A *= -1
        
print(str(A) + ' ' + str(B))

Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-10**5, 10**5):
    if (x + i**5) < 0:
        continue
    
    
    
    else:
        A_tmp = (x + i**5)**(1.0/5)
        
        
        
        if int(A_tmp)**5 == (x + i**5):
            A = int(A_tmp)
            B = i
            
            
            break
print(str(A) + ' ' + str(B))
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
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:
                ans1=i
                ans2=-j
                flag=1
                break
            elif B+b>0:
                break
    else:
        for j in range(10**9):
            b=j**5
            if B-b==0:
                ans1=i
                ans2=j
                flag=1
                break
            elif B-b<0:
                break
    if flag==1:
        break
print(ans1,ans2)

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x=int(input())
for i in range(-int(x**0.2)-1,int(x**0.2)+1):
    for j in range(-int(x**0.2)-1, int(x**0.2)+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x=int(input())
bf=0

for i in range(-2*int(abs(x**0.2)),2*int(abs(x**0.2))+1):
    for j in range(-2*int(abs(x**0.2)), 2*int(abs(x**0.2))+1):
        if i**5-j**5==x:
            print(f"{i} {j}")
            bf=1
            break
    if bf==1:
        break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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(-1000, a):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)

print("no")


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
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
        break

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

for a in range(-upper-1, 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)


print(0, 0)
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())

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


Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
X = int(input())

A = []
B = []
for a in range(-118, 120):
    for b in range(-118, 120):
        if (a ** 5 - b ** 5) == X:
            A.append(a)
            B.append(b)

print(A[0], B[0])

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
a = 0
b = 0
resA = 0
resB = 0
for a in range(101):
  for b in range(-101,101):
    A = a**5
    B = b**5
    if A-B==x:
      resA = a
      resB = b
      break
    else:
      pass
  
print(resA,resB)

Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
resA = 0
resB = 0
for a in range(500):
  for b in range(-500,500):
    A = a**5
    B = b**5
    N= A-B
    if A-B==x:
      resA = a
      resB = b
      break
    else:
      pass
  if A-B==x:
    break
print(resA,resB)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(120):
  for j in range(120):
    if i**5-j**5 == x:
        print(i, j)
        break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-120, 120):
    for j in range(-120, 120):
        if i**5+j**5 == x:
            print(i,-j)
            exit(0)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())
for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i ** 5 + j ** 5 == X:
            print(i, j)
            exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
X = int(input())
for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        if i ** 5 - j ** 5 == X:
            print(i, j)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X=int(input())
a=[]
for i in range(-100,200):
  for j in range(-100,200):
    if i^5-j^5==X:
      a.append(str(i))
      a.append(str(j))
      break
  break    
print(' '.join(a))    
    

Failing test case input:
244

Expected output:
1 -3


Actual output:
-100 152


Fixed submission (verdict: Accepted):
X=int(input())
a=[]
for i in range(-100,200):
  for j in range(-100,200):
    if i**5-j**5==X:
      a.append(str(i))
      a.append(str(j))
      break
print(' '.join(a[0:2]))
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
count = 0
for i in range(-100,100, 1):
    for j in range(-100,100, 1):
        if i^5-j^5 == x:
            print(i,j)
            count=1
            break
    if count == 1:
        break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())
count = 0
for i in range(-1000,1000, 1):
    for j in range(-1000,1000, 1):
        if i**5-j**5 == x:
            print(i,j)
            count=1
            break
    if count == 1:
        break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

x = int(input())
a = [i**5 for i in range(-100, 100)]
b = a.copy()
for i in a:
    for j in b:
        if i-j==x:
            print(i, j)
            sys.exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -243


Fixed submission (verdict: Accepted):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

import math
x = int(input())
for i in range(-200, 200):
    for j in range(-200, 200):
        if i**5-j**5==x:
            print(i, j)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())

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

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


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3


Fixed submission (verdict: Accepted):
X = int(input())
N = 200
for i in range(N):
    for j in range(N):
        if i**5 - j**5 == X:
            print(i, j)
            exit()
        if (-i)**5 - j**5 == X:
            print(-i, j)
            exit()
        if i**5 - (-j)**5 == X:
            print(i, -j)
            exit()
        if (-i)**5 - (-j)**5 == X:
            print(-i, -j)
            exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(200):
  for j in range(-200,200):
    if(i**5-j**5==x):
      print(i,j)
      break
      
    

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
judge = 0
for i in range(-200,200):
  for j in range(-200,200):
    if(i**5-j**5==x):
      print(i,j)
      judge += 1
      break
  if(judge == 1):
    break
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a**5 - b**5 == a:
            print(a, b)
            quit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
-1 0


Fixed submission (verdict: Accepted):
x = int(input())
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a**5 - b**5 == x:
            print(a, b)
            quit()

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
X = int(input())







for a in range(0, 121):
  for b in reversed(range(-121, 120)):
    if b**5 == a**5-X:
      print(a, b)
      break



Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
X = int(input())







for a in range(0, 121):
  for b in reversed(range(-122, 120)):
    if b**5 == a**5-X:
      print(a, b)
      exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X=int(input())
num_list=[i-100 for i in range(200)]
for A in num_list:
  for B in num_list:
    if A**5-B**5==X:
      print(A,B)
      break
  

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
X=int(input())
num_list=[i-120 for i in range(240)]
temp=0
for A in num_list:
  for B in num_list:
    if A**5-B**5==X:
      print(A,B)
      temp=1
      break
  if temp==1:
    break

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())
ans = 0
for i in range(100):
    a = int(i/2)*(-1)**int(i/2)
    for j in range(400):
        b = int(j/2)*(-1)**int(j/2)
        if a**5 - b**5 == x:
            ans = 1
            break
    if ans == 1:
        break
print(a,b)

Failing test case input:
244

Expected output:
1 -3


Actual output:
-49 -199


Fixed submission (verdict: Accepted):
x = int(input())
ans = 0
for i in range(1000):
    a = int(i/2)*(-1)**int(i)
    for j in range(1000):
        b = int(j/2)*(-1)**int(j)
        if a**5 - b**5 == x:
            ans = 1
            break
    if ans == 1:
        break
print(a,b)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import sqrt, log, pow
num = [i**5 for i in range(-100, 500)]
X = int(input())
c = 0
for i in range(len(num)):
    a = num[i]
    for j in range(i+1):
        if a - num[j] == X:
            print(i-1, j-1)
            exit()


Failing test case input:
244

Expected output:
1 -3


Actual output:
100 96


Fixed submission (verdict: Accepted):
num = [i**5 for i in range(-121, 121)]
X = int(input())
for i in range(len(num)):
    a = num[i]
    for j in range(i+1):
        if a - num[j] == X:
            print(i-121, j-121)
            exit()
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

lower = -1
upper = -1
for i in range(0, 1000000):
    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+1):
        if a5 - pow(b, 5) == x:
            print(a, b)
            exit(0)


print(0, 0)


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
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
        break

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

for a in range(-upper-1, 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)


print(0, 0)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = int(input())
for i in range(-s, s):
    for j in range(-s, s):
        if i**5-j**5 == s:
            print(i, j) 
            break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x=int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if (i**5)-(j**5)==x:
      print(i,j)
      exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


x = int(input())
for a in range(-200, 201):
    for b in range(-200, 201):
        if a**5 - b**5 == x:
            print(a, b)
            break

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):


x = int(input())
flag = 0
for a in range(-200, 201):
    if flag == 1:
        break
    for b in range(-200, 201):
        if a**5 - b**5 == x:
            print(a, b)
            flag = 1
            break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(-500,500):
  for j in range(-500,500):
    a = pow(i,5)
    b = pow(j,5)
    if(x == a - b):
      print(a,b)
      exit(0)

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -243


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-500,500):
  for j in range(-500,500):
    a = pow(i,5)
    b = pow(j,5)
    if(x == a - b):
      print(i,j)
      exit(0)
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import pow

x = int(input())

for a in range(x):
    b5 = a**5 - x
    b = pow(abs(b5), 1/3)
    if abs(b) == int(b):
        if b5 < 0:
            b = -b
        break

print(a, int(b))


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

flag = 0

for a in range(x):
    b5 = a**5 - x
    for b in range(120):
        if abs(b5) == int(b**5):
            if b5 < 0:
                b = -b
            flag = 1
            break
    if flag:
        break

print(a, int(b))

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())
i = 0
while i**5 < x and (i + 1)**5 < x:
    i += 1
tmp1 = i ** 5
rest1 = x - tmp1
j = 0
flag = 0
start, end = 0, rest1
while start <= end:
    middle = (start + end)
    if tmp1 + middle ** 5 > x:
        end = middle - 1
    elif tmp1 + middle ** 5 == x:
        flag = 1
        print(i, -middle)
        break
    else:
        start = middle + 1
if not flag:
    tmp2 = (i+1) ** 5
    rest1 = tmp2 - x
    start, end = 0, rest1
    while start <= end:
        middle = (start + end) 
        if tmp2 - middle ** 5 > x:
            start = middle + 1
        elif tmp2 - middle ** 5 == x:
            flag = 1
            print(i, middle)
            break
        else:
            end = middle - 1


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
i = 0
while i**5 < x and (i + 1)**5 < x:
    i += 1
flag = 0
for j in range(x):
    if flag:
        break
    tmp1 = j ** 5
    if tmp1 < x:
        start, end = 0, x - tmp1
        while start <= end:
            middle = (start + end)
            if tmp1 + middle ** 5 > x:
                end = middle - 1
            elif tmp1 + middle ** 5 == x:
                flag = 1
                print(j, -middle)
                break
            else:
                start = middle + 1
    elif tmp1 == x:
        print(j, 0)
        break
    else:
        start, end = 0, tmp1 - x
        while start <= end:
            middle = (start + end) 
            if tmp1 - middle ** 5 > x:
                start = middle + 1
            elif tmp1 - middle ** 5 == x:
                flag = 1
                print(j, middle)
                break
            else:
                end = middle -1

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())
for i in range(200):
  for j in range(200):
    if i**5-j**5 == X:
      print(i,j)
      break

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
X = int(input())
flag = 0
for i in range(-200,200):
  if flag == 1:
    break
  for j in range(-200,200):
    if i**5-j**5 == X:
      print(i,j)
      flag += 1
      break
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = input()
print(x)
a = 0
b = 0
for i in range(1000):
  for j in range(-500, 500):
    if i**5 - j**5 == x:
      a = i
      b = j
      break


print(a, b)        


Failing test case input:
244

Expected output:
1 -3


Actual output:
244
0 0


Fixed submission (verdict: Accepted):
import sys

x = int(input())

for a in range(500):
  for b in range(-500, 500):
    if a**5 - b**5 == x:
      print(a, b)
      sys.exit(0)

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def resolve():
    X = int(input())

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

if __name__ == "__main__":
    resolve()

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
def resolve():
    X = int(input())

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

if __name__ == "__main__":
    resolve()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X = int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if i**5-j**5 == X:
      print(i,j)
      break


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
X = int(input())
flag = 0
for i in range(-200,200):
  if flag == 1:
    break
  for j in range(-200,200):
    if i**5-j**5 == X:
      print(i,j)
      flag += 1
      break

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
X = int(input())

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


Failing test case input:
244

Expected output:
1 -3


Actual output:
1 3
3 1


Fixed submission (verdict: Accepted):
X = int(input())

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

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    import sys
    input = sys.stdin.readline

    X = int(input())
    for a in range(200, 200):
        a5 = a**5
        b5 = a5-X
        for b in range(200, 200):
            if b**5 == b5:
                print(a, b)
                exit()


if __name__ == "__main__":
    main()


Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
def main():
    import sys
    input = sys.stdin.readline

    X = int(input())
    for a in range(-200, 200):
        a5 = a**5
        b5 = a5-X
        for b in range(-200, 200):
            if b**5 == b5:
                print(a, b)
                exit()


if __name__ == "__main__":
    main()
Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if i*5-j**5==x:
      exit()
print("{} {}".format(i,j))

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x=int(input())
for i in range(-200,200):
  for j in range(-200,200):
    if i**5-j**5==x:
      print("{} {}".format(i,j))
      exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

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

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())

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

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())
for i in range(int(x**(1/5)),int(x**(1/5))+2):
  for j in range(-100,100):
    if i**5-j**5 == x:
      print(i,j)
      exit()


Failing test case input:
244

Expected output:
1 -3


Actual output:
3 -1


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-1000,1000):
  for j in range(-1000,1000):
    if i**5-j**5 == x:
      print(i,j)
      exit()

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

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

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -3
3 -1


Fixed submission (verdict: Accepted):
x = int(input())

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

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
a = 0
b = 0
for a in range(-1000,1000):
    for b in range(-1000,1000):
        if a**5 == x + b**5:
            print(a,b)
            break
    break
    

Failing test case input:
244

Expected output:
1 -3


Actual output:

Fixed submission (verdict: Accepted):
x = int(input())
cnt = 0
for a in range(-1000,1000):
    for b in range(-1000,1000):
        if a**5 == x + b**5:
            print(a,b)
            cnt = 1
            break
    if cnt == 1:
        break

Problem: p02690
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(-500,500):
  for j in range(-500,500):
    a = pow(i,5)
    b = pow(j,5)
    if(x == a - b):
      print(a,b)
      exit()

Failing test case input:
244

Expected output:
1 -3


Actual output:
1 -243


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-500,500):
  for j in range(-500,500):
    a = pow(i,5)
    b = pow(j,5)
    if(x == a - b):
      print(i,j)
      exit(0)
Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())

a = 0

while True:
    b5 = a**5 - x
    print(b5)
    
    if b5 >= 0:
        for b in range(b5+1):
            if b**5 == b5:
                print(a, b)
                exit()
            if b**5 > b5:
                break
    else:
        b5m = -b5
        for bm in range(b5m+1):
            if bm**5 == b5m:
                print(a, -bm)
                exit()
            if bm**5 > b5m:
                break
    
    a += 1



Failing test case input:
244

Expected output:
1 -3


Actual output:
-244
-243
1 -3


Fixed submission (verdict: Accepted):
x = int(input())

a = 0

while True:
    b5 = a**5 - x
    
    if b5 >= 0:
        for b in range(b5+1):
            if b**5 == b5:
                print(a, b)
                exit()
            if b**5 > b5:
                break
    else:
        b5m = -b5
        for bm in range(b5m+1):
            if bm**5 == b5m:
                print(a, -bm)
                exit()
            if bm**5 > b5m:
                break
    
    a += 1

Problem: p02690
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
x = int(input())
for i in range(-1000,1000+1):
    for j in range(-1000,1001):
        if i**5 - j*5 == x:
            print(i, j, sep=' ')

Failing test case input:
244

Expected output:
1 -3


Actual output:
-1 -49
4 156


Fixed submission (verdict: Accepted):
x = int(input())
for i in range(-1000,1000+1):
    for j in range(-1000,1001):
        if i**5 - j**5 == x:
            print(i, j)
            exit()