def powerfulIntegers(self, x: int, y: int, bound: int) -> List[int]:
    xlist = [1]
    ylist = [1]
    i = 1
    while (((x ** i) <= bound) and (x > 1)):
        xlist.append((x ** i))
        i += 1
    i = 1
    while (((y ** i) <= bound) and (y > 1)):
        ylist.append((y ** i))
        i += 1
    return list(set(((x + y) for x in xlist for y in ylist if ((x + y) <= bound))))
def powerfulIntegers(self, x: int, y: int, bound: int) -> List[int]:
    xlist = [1]
    ylist = [1]
    i = 1
    while (((x ** i) <= bound) and (x > 1)):
        xlist.append((x ** i))
        i += 1
    i = 1
    while (((y ** i) <= bound) and (y > 1)):
        ylist.append((y ** i))
        i += 1
    return list(set(((x + y) for x in xlist for y in ylist if ((x + y) <= bound))))