12. Given the function $f(x)=a+x-b^{x}$ has a zero $x_{0} \in(n, n+1)(n \in \mathbf{Z})$, where the constants $a, b$ satisfy the conditions $2019^{a}=2020,2020^{b}=2019$. Then the value of $n$ is $\qquad$
12. -1 .

From $2019^{a}=2020,2020^{b}=2019$, we know
$$
10, \\
f(-1)=a-1-\frac{1}{b}<a-1-1<0,
\end{array}
$$

By the Intermediate Value Theorem, we know that the function $f(x)$ has a unique zero in the interval $(-1,0)$.
Therefore, the value of $n$ is -1.