[b]Problem 6.[/b] Let $p>2$ be prime. Find the number of the subsets $B$ of the set $A=\{1,2,\ldots,p-1\}$ such that, the sum of the elements of $B$ is divisible by $p.$

[i] Ivan Landgev[/i]
To solve this problem, we need to find the number of subsets \( B \) of the set \( A = \{1, 2, \ldots, p-1\} \) such that the sum of the elements of \( B \) is divisible by \( p \), where \( p \) is a prime number greater than 2.

1. **Consider the polynomial \( P(x) \):**
   \[
   P(x) = \prod_{k=1}^{p-1} (x - \epsilon^k)
   \]
   where \( \epsilon \) is a primitive \( p \)-th root of unity. This polynomial can be rewritten using the properties of roots of unity.

2. **Properties of roots of unity:**
   The \( p \)-th roots of unity are the solutions to the equation \( x^p = 1 \). These roots are \( 1, \epsilon, \epsilon^2, \ldots, \epsilon^{p-1} \), where \( \epsilon \) is a primitive \( p \)-th root of unity. The polynomial \( P(x) \) can be expressed as:
   \[
   P(x) = x^{p-1} - 1
   \]
   This follows from the fact that the product of all \( p \)-th roots of unity (excluding 1) is \( x^{p-1} - 1 \).

3. **Generating function approach:**
   Consider the generating function for the subsets of \( A \):
   \[
   G(x) = \prod_{k=1}^{p-1} (1 + x^k)
   \]
   This generating function encodes the sums of all subsets of \( A \). Each term \( (1 + x^k) \) represents the choice of either including or excluding the element \( k \) in a subset.

4. **Evaluate \( G(x) \) modulo \( x^p - 1 \):**
   Since \( x^p \equiv 1 \pmod{x^p - 1} \), we can simplify \( G(x) \) modulo \( x^p - 1 \):
   \[
   G(x) = \prod_{k=1}^{p-1} (1 + x^k) \equiv \prod_{k=1}^{p-1} (1 + x^k) \pmod{x^p - 1}
   \]
   Notice that \( G(x) \) is a polynomial of degree less than \( p \).

5. **Sum of coefficients divisible by \( p \):**
   The sum of the coefficients of \( G(x) \) gives the total number of subsets of \( A \) whose sum of elements is divisible by \( p \). By symmetry and properties of roots of unity, exactly \( \frac{2^{p-1}}{p} \) subsets will have their sum divisible by \( p \).

6. **Conclusion:**
   The number of subsets \( B \) of \( A \) such that the sum of the elements of \( B \) is divisible by \( p \) is:
   \[
   \boxed{\frac{2^{p-1}}{p}}
   \]