Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
l=6300
for a in range(-l,l+1):
  for b in range(-l,l+1):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
l=6500
for a in range(-l,l+1):
  for b in range(-l,l+1):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
for a in range(-7000,7001):
  for b in range(-7000,7001):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
for a in range(-8000,8001):
  for b in range(-8000,8001):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
for a in range(-9000,9001):
  for b in range(-9000,9001):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
for a in range(-9500,9501):
  for b in range(-9500,9501):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
done=False
for a in range(-10000,10001):
  for b in range(-10000,10001):
    if(not done and a**5-b**5==x):
      print(a,b)
      done=True

Fixed submission:

x = int(input())
for a in range(-300,301):
  if(a<0):
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break
  else:
    for b in range(-300,a):
      if(a**5-b**5==x):
        print(a,b)
        break
    else: continue
    break