Given two integers $n\geq 1$ and $q\geq 2$, let $A=\{(a_1,\ldots ,a_n):a_i\in\{0,\ldots ,q-1\}, i=1,\ldots ,n\}$. If $a=(a_1,\ldots ,a_n)$ and $b=(b_1,\ldots ,b_n)$ are two elements of $A$, let $\delta(a,b)=\#\{i:a_i\neq b_i\}$. Let further $t$ be a non-negative integer and $B$ a non-empty subset of $A$ such that $\delta(a,b)\geq 2t+1$, whenever $a$ and $b$ are distinct elements of $B$. Prove that the two statements below are equivalent: a) For any $a\in A$, there is a unique $b\in B$, such that $\delta (a,b)\leq t$; b) $\displaystyle|B|\cdot \sum_{k=0}^t \binom{n}{k}(q-1)^k=q^n$