Prove that for any set with $m$ elements, if the average of any $n < m$ elements is equal to the constant $k$, then each of the $m$ elements are equal to $k$.
Attempt: Considering some specific examples, say $m = 4$, $n = 3$, and $k=4$. Let the set be $\{a_1, a_2, a_3, a_4\}$, clearly if the average of any 3 of the elements is 4, then $\frac{a_1+a_2+a_3}{3} = 4 \implies a_1+a_2+a_3 = 12$. If $a_1$, $a_2$, and $a_3$ weren't all equal to $4$, say, $a_1=0$, $a_2=0$, and $a_3=12$, then $a_4$ must be equal to $0$, since $a_2+a_3+a_4 = 0+12+0=12$. But, if $a_4=0$ then $a_1+a_2+a_4 = 0 \neq 12$, meaning the average of $a_1$, $a_2$ and $a_4$ is not $4$, so clearly the only way for the average of any 3 elements of the set to be equal to 4 is if all elements are equal to 4.
How can I generalize this proof?
Call the elements $a_1,a_2,\dots,a_m.$ Note that $$a_1+a_2+\cdots+a_n=a_2+a_3+\cdots+a_{n+1}$$ since both sums are equal to $nk.$ It follows that $a_1=a_{n+1}.$ Since the indexing is arbitrary, it follows that any two elements are equal. And of course the common value must be $k.$