Given $n$ and $k$ I would like to show that the number of solutions of the equation $$x_1+x_2+\dots + x_k = r \pmod{n}$$ where the $x_i$'s are integers satisfying $0<x_i<n$ is equal for all values of $r\in \{1,2,\dots, n-1\}$. For context, this was part of an online assessment test from a company for a software engineering position. During the test, I managed to calculate the number of solutions for $r=0$ by using a roots of unity filter and guesstimated that for all other $r$ it must be equal. Then since the sum over $r$ of the number of solutions is equal to $(n-1)^k$ I managed to get the answer by solving a simple equation. However, I would like to prove that my guesstimation is indeed correct. Using a roots of unity filter gives a messy calculation when $r\neq n$ which I could not easily simplify. Then I tried to find a bijection between the set of solutions for $r$ and $r'$ but again this approach was not fruitful. Any help is appreciated!
EDIT: Here is my complete thought process. Let $$P(x) = x + x^2 + \dots + x^{n-1}$$ Let $G(x)=P(x)^k = a_0 + a_1x + a_2x^2 + \dots$ where the coefficients of $x^m$ where $m>\deg(G)$ are zero. Then the answer for any $r>0$ is equal to $a_0 + a_r + a_{2r} + \dots$ (here $a_0 = 0$). For $r=0$ the answer is equal to $a_0+a_n+a_{2n}+\dots$. These can be calculated exactly by root of unity filters. That is, for $r>0$ we have $$a_0+a_r+a_{2r}+\dots = \frac{1}{r}\left(G(1)+G(\omega)+\dots + G(\omega^{r-1})\right)$$ where $\omega$ is an $r$-th root of unity. For $r=0$ we take $r=n$ in the above formula which simplifies nicely to $$\frac{1}{n}\left((n-1)^k - (-1)^k\right)$$ Now if $r\neq n$ there is no obvious simplification.