A4 (3-3, Bulgaria) Solve the equation $\cos ^{n} x-\sin ^{n} x=1$, where $n$ is any given positive integer.
When $n$ is even, let $n=2 m$, we have
$$
\cos ^{3 m} x=1+\sin ^{2 m} x \text {, }
$$

Since $\cos ^{2 m} x \leqslant 1 \leqslant 1+\sin ^{2 m} x$, it can only be that
$$
\sin x=0, \cos x= \pm 1 \text {, }
$$

In this case, $x=k \pi$ (where $k$ is an integer).
When $n$ is odd and $n \geqslant 3$, from
$1=\cos ^{n} x-\sin ^{n} x \leqslant \cos ^{2} x+\sin ^{2} x=1$ we know that it must be $\cos x=1, \sin x=0$ or $\cos x=0, \sin x=-1$. This leads to
$x=2 k \pi$ or $2 k \pi-\frac{\pi}{2}$ (where $k$ is an integer).
When $n=1$, the original equation is
$\cos x-\sin x=1$, which is equivalent to
$\cos \left(x+\frac{\pi}{4}\right)=\frac{\sqrt{2}}{2}$, and we still have
$x=2 k \pi$ or $2 k \pi-\frac{\pi}{2}$ (where $k$ is an integer).