Problem

Source: XI International Festival of Young Mathematicians Sozopol 2022, Theme for 11-12 grade

Tags: number theory



Let $p$ and $q$ be given prime numbers and $S$ be a subset of ${1,2,3,\dots ,p-2,p-1}$. Prove that the number of elements in the set $A=\{ (x_1,x_2,…,x_q ):x_i\in S,\sum_{i=1}^q x_i \equiv 0(mod\: p)\}$ is multiple of $q$.