Given an integer $k > 1$, let $\mathbf{R}$ be the set of all real numbers. Find all functions $f: \mathbf{R} \rightarrow \mathbf{R}$ such that for all $x$ and $y$ in $\mathbf{R}$, we have
$$
f\left(x^{k}+f(y)\right)=y+(f(x))^{k} .
$$
(Huang Xuan-guo provided)
$$
\begin{array}{l}
\text { Solution: Let } x=0, t=(f(0))^{k} \text {, by (1) we have } \\
f(f(y))=y+t . \\
\text { and } \left.f\left(f\left(x^{k}+f(f(y))\right)\right)=f(f(y)+f(x))^{k}\right) \\
=f\left((f(x))^{k}+f(y)\right)=y+(f(f(x)))^{k} \\
=y+(x+t)^{k} . \\
\text { By (2) we have } \\
\quad f\left(f\left(x^{k}+f(f(y))\right)\right)=x^{k}+f(f(y))+t \\
\quad=x^{k}+y+2 t .
\end{array}
$$

From (3) and (4) we have $x^{k}+y+2 t=y+(x+t)^{k}$, i.e., for any $x \in \mathbf{R}$, we have
$$
x^{k}+2 t=(x+t)^{k} \text {. }
$$

This implies $t=0$, i.e., $f(0)=0$.
From (2) and (6) we have
$f(f(y))=y$.
From (1) and (7), we have
$$
\begin{array}{l}
f(x+y)=f(x+f(f(y))) \\
=f\left(\left(x^{\frac{1}{k}}\right)^{k}+f(f(y))\right) \\
\left.=f(y)+f\left(x^{\frac{1}{k}}\right)\right)^{k} .
\end{array}
$$

Here, when $k$ is even, we restrict $x \geqslant 0$.
(1) When $k$ is even, from the above equation, $f(x)$ is an increasing function on $\mathbf{R}$. Now we prove: for $\forall x \in \mathbf{R}, f(x)=x$.

Because, if there exists $z \in \mathbf{R}, f(z) \neq z$. When $z<f(z)$, we have $f(z) \geqslant f(f(z))=z$, which is a contradiction. When $z>f(z)$, we have $f(z) \leqslant f(f(z))=z$, which is also a contradiction.
(2) When $k$ is odd, from (1) by setting $y=0$, we have
$f\left(x^{k}\right)=(f(x))^{k}$.
Thus, $\left(f\left(x^{\frac{1}{k}}\right)\right)^{k}=f(x), x \in \mathbf{R}$
From (8) and (9) we have
$$
f(x+y)=f(x)+f(y), \forall x, y \in \mathbf{R} \text {. }
$$

From (10) we know for any rational number $t$, we have
$$
f(t x)=t f(x), \forall x \in \mathbf{R}
$$

and $f(-x)=-f(x)$.
From (9) and (10) we have
$f\left((t+x)^{k}\right)=(f(t+x))^{k}=(f( \pm)+f(x))^{k}$.
Thus, $f\left(\sum_{s=6}^{k} \mathrm{C}_{\pi}^{s} \tau_{x^{s}-s}^{s}\right)$
$$
=\sum_{s=0}^{k} C_{k}^{k}(f(t))^{s}(f(x))^{k-s} .
$$

From (10) and (11) and the above equation, we know for any rational number $t$, we have
$$
\begin{array}{l}
\sum_{s=0}^{k} \mathrm{C}_{4}^{s} t^{s} f^{\prime}\left(x^{k-s}\right) \\
=\sum_{s=0}^{k} \mathrm{C}_{k}^{s} t^{s}(f(1))^{s}(f(x))^{k-s} .
\end{array}
$$

Thus, $f\left(x^{k-s}\right)=(f(1))^{s}(f(x))^{k-s}, s \in\{0,1$, $\cdots, k\}$.
Let $s=k, x=1$, we have
$f(1)=(f(1))^{k}$.
Since $k^{\prime}>1$ is a positive integer and from (6) and (7), we have
$f(1)= \pm 1$.
Taking $s=k-2$, then $s$ is odd. From (13) and (15) we have
$\left.f\left(x^{2}\right)= \pm f(x)\right)^{2}$.
When the above equation takes the positive sign, we have
$$
f(x)=f\left((\sqrt{x})^{2}\right)=(f(\sqrt{x}))^{2}>0 \text {. }
$$

From (10) and (17), we know $f(x)$ is an increasing function, and using (7), we have $f(x)=x$.
When equation (16) takes the negative sign, for $\forall x>0$ we have
$$
f(x)=f\left((\sqrt{x})^{2}\right)=-(f(\sqrt{x}))^{2}f(z)$ when $z<f(z)$, we have $f(-z) \leqslant f(f(z))=z$, $-f(z) \leqslant z, f(z) \geqslant-z$, which is also a contradiction.
Upon verification, when $k$ is even, $f(x)=x$ is a solution; when $k$ is
$$
$$