1. The number of integer solutions to the equation $\left(x^{2}-x-1\right)^{x+2}=1$ is ( ).
(A) 5
(B) 4
(C) 3
(D) 2
-1. (B).
When $x^{2}-x-1=1$, $x_{1}=2, x_{2}=-1$; when $x+2=0$ and $x^{2}-x-1 \neq 0$, $x_{3}=-2$; when $x^{2}-x-1=-1$ and $x+2$ is even, $x=0, x=1$ (discard). Therefore, the integer solutions of the equation are
$$
x_{1,3}= \pm 2, x_{2}=-1, x_{4}=0 .
$$