II. (40 points) Given that $m$ and $n$ are two different positive integers, the last four digits of $2019^{m}$ and $2019^{n}$ are equal. Find the minimum value of $m+n$.

保留源文本的换行和格式，直接输出翻译结果。
Let's assume $m > n$.
Notice that, $10000 = 2^4 \times 5^4$.
From the problem, we know
$10000 \mid (2019^m - 2019^n)$,
$2019^m - 2019^n = 2019^n (2019^{m-n} - 1)$.
Since $2019^n$ is odd and has no factor of 2, $2019^{m-n} - 1$ must be even. Therefore, $2^4 \mid (2019^{m-n} - 1)$.

Notice that the sequence of remainders of $2019^{m-n}$ modulo 10 is $9, 1, 9, 1, \cdots$.

Thus, only when $m-n = 2k$ does $2019^{m-n} - 1$ become divisible by $2^4$.
Since $2019^{2k} \equiv 9^k \pmod{2^4}$, we need $2^4 \mid (9^k - 1)$.
By $9^k - 1 = (9-1)(9^{k-1} + 9^{k-2} + \cdots + 9 + 1)$
$\Rightarrow 2 \mid (9^{k-1} + 9^{k-2} + \cdots + 9 + 1)$.
Each term is congruent to 1 modulo 2, and there are $k$ terms, so $k$ must be a multiple of 2, i.e.,
$$
k = 2p \Rightarrow m-n = 4p.
$$

Since $2019^n$ has no factor of 5, $2019^{m-n} - 1 = 2019^{4p} - 1$ must be divisible by $5^4$.
Since $2019^{4p} \equiv 446^p \pmod{5^4}$, we need $5^4 \mid (446^p - 1)$.
By $446^p - 1$
$$
\begin{array}{l}
= (446-1)(446^{p-1} + 446^{p-2} + \cdots + 446 + 1) \\
\Rightarrow 125 \mid (446^{p-1} + 446^{p-2} + \cdots + 446 + 1).
\end{array}
$$

Each term is congruent to 1 modulo 5, and there are $p$ terms, so $p$ must be a multiple of 5, i.e., $p = 5t$, hence
$$
\begin{array}{l}
446^p - 1 \equiv 446^{5t} - 1 \equiv 601^t - 1 \\
\equiv (601-1)(601^{t-1} + 601^{t-2} + \cdots + 601 + 1) \pmod{5^4} \\
\Rightarrow 25 \mid (601^{t-1} + 601^{t-2} + \cdots + 601 + 1).
\end{array}
$$

Each term is congruent to 1 modulo 5, and there are $t$ terms, so $t$ must be a multiple of 5, i.e.,
$$
t = 5s \Rightarrow p = 25s.
$$

By $446^p - 1 \equiv 446^{5t} - 1 \equiv 601^t - 1$
\equiv 601^{5s} - 1 \equiv 501^s - 1 \\
\equiv (501-1)(501^{s-1} + 501^{s-2} + \cdots + 501 + 1) \pmod{5^4} \\
\Rightarrow 5 \mid (501^{s-1} + 501^{s-2} + \cdots + 501 + 1).
\end{aligned}
$$

Each term is congruent to 1 modulo 5, and there are $s$ terms, so $s$ must be a multiple of 5, i.e.,
$$
s = 5u \Rightarrow p = 125u.
$$

Thus, $m-n = 500u$
$\Rightarrow m = 500u + n$
$\Rightarrow m+n = 500u + 2n$.
When $u$ and $n$ take their respective minimum values 1 and 1, $m+n$ achieves its minimum value of 502.