Maximise the product of $k$ integers such that their sum is $n$
The solution for two integers, I think, $a + b = n$ is $a = \lfloor{n/2}\rfloor$ and $b = n-a$
For $k$ integers,I think that there should be $n\mod k$ elements of value $\lceil{n/k}\rceil$ and $k - (n\mod k$) elements of value $\lfloor{n/k}\rfloor$
Are these assertions correct?
Here is another way to show your assertion holds.
Suppose $a_i$ for $1 \le i \le k$ are the $k$ integers which give the maximum. Then if $a_i-a_j > 1$, we can replace both $a_i$ and $a_j$ with $a_i -1$ and $a_j+1$ respectively without changing the sum, but increasing the product as $$(a_i -1)(a_j+1) > a_i a_j \iff a_i -a_j > 1$$
So we must have $a_i \in \{a, a+1\}$ for some integer $a$. Let $m \in [0, k)$ of the integers in the optimal solution be $a$. Then clearly we must have $ma+(k-m)(a+1)=n \iff m+n \equiv 0 \pmod k$. This allows you to fix $m$ as the least whole number to add to $n$ to get a multiple of $k$, and then $a$ can be solved for as $a = \dfrac{m+n}{k}-1$, which is in fact $\lfloor \frac{n}k \rfloor$.