12. Given a positive integer $N$ that has exactly nine positive divisors, among which three positive divisors $a, b, c$ satisfy
$$
a+b+c=2017, a c=b^{2} \text {. }
$$

Find the value of $N$.
12. Let $a<b<c$.

Since $a+b+c=2017$ is a prime number, the greatest common divisor of $a$, $b$, and $c$ is 1.
If $a=1$, then $c=b^{2}$. Hence,
$$
1+b+b^{2}=2017,
$$

which has no integer solutions.
By the problem, we know that $N=p^{8}$ or $N=p^{2} q^{2}$, where $p$ and $q$ are two distinct primes.
If $N=p^{8}$, then $a=1$ must hold, which has no integer solutions;
If $N=p^{2} q^{2}$, arrange the nine divisors of $N$ as shown in Table 1, where the three numbers satisfying $a c=b^{2}$ are either in the same row, the same column, or on the diagonal.

Notice that each row, each column, and the diagonal from the top left to the bottom right have a common factor greater than 1 or $a=1$. Therefore, the only possibility is that $a$, $b$, and $c$ are $p^{2}$, $p q$, and $q^{2}$, respectively.
$$
\begin{array}{l}
\text { Then } p^{2}+p q+q^{2}=2017 \\
\Rightarrow(p+q)^{2}=p q+2017 . \\
\text { Hence } p q+2017 \geqslant 4 p q \Rightarrow p q \leqslant 672 . \\
\Rightarrow 2017<(p+q)^{2} \leqslant 2689 .
\end{array}
$$

If one of $p$ and $q$ is 2, then equation (1) has no integer solutions. Therefore, $p+q$ is even. Thus, $p+q=46,48,50$.
Upon inspection, when $p=7$ and $q=41$, the original problem holds.
In conclusion, $N=7^{2} \times 41^{2}=82369$.