Problem p02690 (python)

Fixed submission:
import sys
from math import pow
def main():
    x = int(input())
    for a in range(-1000,1001):
        for b in range(-1000,1001):
            if pow(a, 5) - pow(b, 5) == x:
                print(a, b)
                sys.exit()

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from itertools import product
def main():
    x = int(input())
    n5 = [i**5 for i in range(65)]
    c = product(n5, repeat=2)
    for ce in c:
        if ce[0] + ce[1] == x:
            r = (int(ce[0]**0.2), int(ce[1]**0.2)* -1)
            break
        elif ce[0] - ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))
            break
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from itertools import combinations
def main():
    x = int(input())
    n5 = [i**5 for i in range(-100,1000)]
    c = combinations(n5, 2)
    for ce in c:
        if ce[0] + ce[1] == x:
            r = (int(ce[0]**0.2), int(ce[1]**0.2)* -1)
            break
        elif ce[0] - ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))
            break
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from itertools import combinations
def main():
    x = int(input())
    n5 = [i**5 for i in range(65)]
    c = combinations(n5, 2)
    for ce in c:
        if ce[0] + ce[1] == x:
            r = (int(ce[0]**0.2), int(ce[1]**0.2)* -1)
            break
        elif ce[0] - ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))
            break
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    x = int(input())
    p1 = 1
    while True:
        p15 = p1 ** 5
        rt1 = ((x + p15) ** 0.2) % 1
        if (x - p15) < 0:
            rt2 = ((-1*(x - p15)) ** 0.2) % 1
        else:
            rt2 = ((x - p15) ** 0.2) % 1
        if rt1 == 0:
            r = (int((x + p15) ** 0.2), p15)
            break
        elif rt2 == 0:
            r = (int((-1*(x - p15)) ** 0.2), -p15)
            break
        else:
            p1 += 1
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    x = int(input())
    p1 = 1
    while True:
        p15 = p1 ** 5
        rt1 = ((x + p15) ** 0.2) % 1
        rt2 = ((x - p15) ** 0.2) % 1
        if rt1 == 0:
            r = (int((x + p15) ** 0.2), p15)
            break
        elif rt2 == 0:
            r = (int((x - p15) ** 0.2), -p15)
            break
        else:
            p1 += 1
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    x = int(input())
    p1 = 1
    while True:
        p15 = p1 ** 5
        rt1 = ((x + p15) ** 0.2) % 1
        rt2 = ((x - p15) ** 0.2) % 1
        if rt1 == 0:
            r = (int((x + p15) ** 0.2), p15)
            break
        elif rt2 == 0:
            r = (int((x - p15) ** 0.2), -p15)
            break
        print(p1)
        p1 += 1
    print(*r, sep=' ')
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    x = int(input())
    p1 = 1
    while True:
        p15 = p1 ** 5
        rt1 = ((x + p15) ** 0.2) % 1
        rt2 = ((x - p15) ** 0.2) % 1
        if rt1 == 0:
            r = (int((x + p15) ** 0.2), p15)
            break
        elif rt2 == 0:
            r = (int((x - p15) ** 0.2), -p15)
            break
        print(p1)
        p1 += 1
    print(r)
if __name__ == '__main__':
    main()