5. $\operatorname{tg} x=1$ is a ( ) of $x=\frac{5 \pi}{4}$.
(A) necessary condition, but not a sufficient condition
(B) sufficient condition, but not a necessary condition
(C) sufficient condition, and also a necessary condition
(D) neither a sufficient condition, nor a necessary condition
5. A.
$\operatorname{tg} \frac{5 \pi}{4}=1$. Conversely, if $\operatorname{tg} x=1$, it does not necessarily mean that $x=\frac{5 \pi}{4}$. Therefore, $\operatorname{tg} x=1$ is a necessary but not sufficient condition for $x=\frac{5 \pi}{4}$.