Problem p02690 (python)

Fixed submission:
import math
X = int(input())


def fif_root(arg):
    def root(x):
        return math.floor(math.pow(x,1/5)*pow(10,10))/pow(10,10)
    return list(map(lambda x: root(x), arg))

def check_integer(arg):
    return list(map(lambda x: x.is_integer(), arg))

a = 0
while (A:= math.pow(a, 5))-math.pow(a-1, 5) <= X:
    #a,-aの時それぞれの5乗根を計算する。
    root = fif_root([abs(X-A), X+A])
    if True in (c := check_integer(root)):
        idx = c.index(True)
        b = int(root[idx])
        if idx == 1:
            a, b = -a, -b
        else:
            if X - A >= 0:
                b = -b
        print(a, b)
        break
    a += 1

Buggy submission (verdict: Runtime Error):
X = int(input())
pow5 = [pow(i,5) for i in range(-150,150)]
for a in range(-150,150):
  for b in range(-150,150):
    if pow5[a+150]+pow[b+150] ==X:
      print(a,b)
      break

Buggy submission (verdict: Runtime Error):
X = int(input())
pow5 = [pow(i,5) for range(-150,150)]
for a in range(-150,150):
  for b in range(-150,150):
    if pow5[a+150]+pow[b+150] ==X:
      print(a,b)
      break

Buggy submission (verdict: Runtime Error):
X = int(input())
pow5 = [pow(i,5) for range(-150,150)]
for a in range(-150,150):
  for b in range(-150,150):
    if pow5[a+150]+pow[b+150] ==x:
      print(a,b)
      break

Buggy submission (verdict: Runtime Error):
X = int(input())
pow5 = [pow(i,5) for range(-150,150)]
for a in range(-150,150):
  for b in range(150,150):
    if pow5[a+150]+pow[b+150] ==x:
      print(a,b)
      break

Buggy submission (verdict: Runtime Error):
import math
X = int(input())


def fif_root(arg):
    def root():
        return math.floor(math.pow(x,1/5)*pow(10,10))/pow(10,10)
    return list(map(lambda x: root(x), arg))

def check_integer(arg):
    return list(map(lambda x: x.is_integer(), arg))

a = 0
while (A:= math.pow(a, 5))-math.pow(a-1, 5) <= X:
    #a,-aの時それぞれの5乗根を計算する。
    root = fif_root([abs(X-A), X+A])
    if True in (c := check_integer(root)):
        idx = c.index(True)
        b = int(root[idx])
        if idx == 1:
            a, b = -a, -b
        else:
            if X - A >= 0:
                b = -b
        print(a, b)
        break
    a += 1

Buggy submission (verdict: Runtime Error):
import math
X = int(input())


def fif_root(arg):
    return list(map(lambda x: math.pow(x,1/5), arg))

def check_integer(arg):
    return list(map(lambda x: x.is_integer(), arg))

a = 0
while (A:= math.pow(a, 5))-math.pow(a-1, 5) <= X:
    root = fif_root([X-A, X+A])
    if True in (c := check_integer(root)):
        idx = c.index(True)
        b = root[idx]
        if idx == 1:
            a, b = -a, -int(b)
        else:
            if X - A > 0:
                b = -int(b)
            else:
                b = int(b)
        print(a, b)
        break
    a += 1

Buggy submission (verdict: Runtime Error):
import math
X = int(input())


def fif_root(n):
    return math.pow(n, 1/5)


a = 0
while True:
    A = math.pow(a, 5)
    b = list(map(lambda x: fif_root(x), [abs(X-A), X+A]))
    if True in (c := list(map(lambda x: x.is_integer(), b))):
        idx = c.index(True)
        b = b[idx]
        if ind == 1:
            a, b = -a, -int(b)
        else:
            if X - A > 0:
                b = -int(b)
            else:
                b = int(b)
        break
    a += 1
print(a, b)

Buggy submission (verdict: Runtime Error):
import math
X = int(input())
a = 0
A = 0


def fif_root(n):
    return math.pow(n, 1/5)


while A <= X:
    A = pow(a, 5)
    b = list(map(lambda x: fif_root(x), [X-A, X+A]))
    if True in (c := list(map(lambda x: x.is_integer(), b))):
        ind = c.index(True)
        if ind == 1:
            a, b = -a, -int(b[ind])
        else:
            a, b = a, -int(b[ind])
        break
    a += 1
print(a, b)