How to solve this (maybe) combinatorics problem? There are $n$ people, and we are allowed to divide them into 2 or more teams (at most $k$,  $k \leq n$). It is allowed for a team to consist of only one people. After dividing them, two people will fight if they are from different team. We want to maximize the number of fight, how to best divide those $n$ people?
Example: $n = 6$, $k = 3$ then the optimal way is to divide them into $3$ team each consisting of $2$ people, which will result in $12$ fights.
After some brute force experiment I think the best way is to distribute them into as many team as possible, and each team has member distributed as equally as possible (basically divide them and distribute the result and remainder to all $k$ teams), but I don't know how to prove this.

The number of fights with $m$ groups is the number of edges in a complete $m$-partite graph with $n$ vertices. According to this question, this number of edges is $$\dfrac{n^2(m-1)}{2m}$$
This obviously increases with $m$, so you want to use the largest authorised size $m=k$, and the answer is then $$\dfrac{n^2(k-1)}{2k}\text{ fights}$$
