def find_invpow(x: int, n: int) -> int:
    """
    Finds the integer component of the n'th root of x,
    an integer such that y ** n <= x < (y + 1) ** n.
    """
    BASE = 2
    upper_bound = 1
    exponent = 0
    while upper_bound ** n < x:
        exponent += 1
        upper_bound = BASE ** exponent
    lower_bound = pow(2, exponent-1)
    candidate = lower_bound
    while lower_bound < upper_bound:
        candidate = (lower_bound + upper_bound) // 2
        if lower_bound < candidate and candidate ** n < x:
            lower_bound = candidate
        elif upper_bound > candidate and candidate ** n > x:
            upper_bound = candidate
        else:
            assert candidate ** n == x
            return candidate
    assert (candidate + 1) ** n == x
    return candidate + 1