Let $n\in\mathbb{Z}^+$. Arrange $n$ students $A_1,A_2,...,A_n$ on a circle such that the distances between them are.equal. They each receives a number of candies such that the total amount of candies is $m\geq n$. A configuration is called [i]balance[/i] if for an arbitrary student $A_i$, there will always be a regular polygon taking $A_i$ as one of its vertices, and every student standing at the vertices of this polygon has an equal number of candies.

a) Given $n$, find the least $m$ such that we can create a balance configuration.

b) In a [i]move[/i], a student can give a candy to the student standing next to him (no matter left or right) on one condition that the receiver has less candies than the giver. Prove that if $n$ is the product of at most $2$ prime numbers and $m$ satisfies the condition in a), then no matter how we distribute the candies at the beginning, one can always create a balance configuration after a finite number of moves. 
### Part (a)

1. **Understanding the Problem:**
   We need to find the least number \( m \) such that we can distribute \( m \) candies among \( n \) students arranged in a circle, ensuring that the configuration is balanced. A configuration is balanced if for any student \( A_i \), there exists a regular polygon with \( A_i \) as one of its vertices, and all students at the vertices of this polygon have an equal number of candies.

2. **Initial Distribution:**
   Consider giving each student exactly 1 candy. This means \( m = n \).

3. **Verification:**
   - Each student \( A_i \) has 1 candy.
   - For any regular polygon with \( k \) vertices (where \( k \) divides \( n \)), each vertex will have 1 candy.
   - Since all students have the same number of candies, the configuration is balanced.

Thus, the least \( m \) such that we can create a balanced configuration is \( m = n \).

### Part (b)

1. **Understanding the Problem:**
   We need to prove that if \( n \) is the product of at most 2 prime numbers and \( m \geq n \), then no matter how we distribute the candies initially, we can always reach a balanced configuration after a finite number of moves. A move consists of a student giving a candy to a neighboring student who has fewer candies.

2. **Prime Factorization:**
   Let \( n = p_1 \cdot p_2 \) where \( p_1 \) and \( p_2 \) are prime numbers (or \( n = p_1 \) if \( n \) is a single prime).

3. **Invariant and Convergence:**
   - Define the "imbalance" of the configuration as the sum of the absolute differences in the number of candies between neighboring students.
   - Each move reduces the imbalance because a candy is transferred from a student with more candies to a student with fewer candies.
   - Since the total number of candies \( m \) is fixed and \( m \geq n \), the imbalance will eventually reach zero, leading to a balanced configuration.

4. **Regular Polygons:**
   - For \( n = p_1 \cdot p_2 \), consider the regular polygons with \( p_1 \) and \( p_2 \) vertices.
   - The balancing process ensures that the candies are distributed evenly among the vertices of these polygons.

5. **Finite Moves:**
   - Since each move reduces the imbalance and the imbalance is a non-negative integer, the process will terminate after a finite number of moves.

Thus, we have shown that for \( n \) being the product of at most 2 prime numbers and \( m \geq n \), a balanced configuration can always be achieved after a finite number of moves.

\(\blacksquare\)

The final answer is \( \boxed{ m = n } \)