I'm quite fascinated by the above Simple question. i.e.,
If I just make $k$ as big as, say $k \ge 10^8 $ , then it's quite heavy to compute the value of $2^k$.
My query is, if that becomes the case, then Given the values of $n$ & $k$, how can we find $x$ alternatively which can be more efficient (efficient in a sense that, the process will be computationally cost effective)?
[ say, either by making the computationally costly operation $(2^k)$ as minimum as possible or by avoiding it completely ] ?
I'm curious about this.
EDIT $1$ :
And what if, $n$ is also large? (say, $n \geq 10^{18}$ )
Perhaps try logarithm,$$x=\frac{n}{2^k}=\exp(\ln n - k \ln 2) $$