Not exactly brute force, but the neat answer allows us to use the synthetic division to find the answer.
Sorry for the picture, I'll try to format them with MathJax, but it might take a while.
First, by evaluating $f(1)$, we can find the remainder of the division by $(X-1)$
$$f(1) = 2018\cdot 1^{2019} - 2019 \cdot 1^{2018} + 1 = 0$$
Now dividing $f(X)$ by $(X-1)$
$$
\begin{array}{r|rrrrrrrr}
1&2018&-2019&0&0&0&\dots&0&1\\
&&2018&-1&-1&-1&\dots&-1&-1\\\hline
&2018&-1&-1&-1&-1&\dots&-1&0
\end{array}$$
$$f(X) = (X-1) (2018X^{2018} - X^{2017} - X^{2016} - X^{2015} - \dots - X^1 - 1)$$
This new polynomial is also divisible by $(X-1)$. Let's do the synthetic division again.
$$
\begin{array}{r|rrrrrrrr}
1&2018&-1&-1&-1&-1&\dots&-1&-1\\
&&2018&2017&2016&2015&\dots&2&1\\\hline
&2018&2017&2016&2015&2014&\dots&1&0
\end{array}$$
Giving us the desired answer
$$f(X) = (X-1)^2(2018X^{2017} + 2017X^{2016} + 2016X^{2015} + \dots + 2X^1 + 1)$$