Two players $A$ and $B$ play a game with a ball and $n$ boxes placed onto the vertices of a regular $n$-gon where $n$ is a positive integer. Initially, the ball is hidden in a box by player $A$. At each step, $B$ chooses a box, then player $A$ says the distance of the ball to the selected box to player $B$ and moves the ball to an adjacent box. If $B$ finds the ball, then $B$ wins. Find the least number of steps for which $B$ can guarantee to win.
1. **Initial Setup**: The ball is hidden in one of the $n$ boxes placed at the vertices of a regular $n$-gon. Player $A$ hides the ball, and Player $B$ tries to find it. At each step, Player $B$ chooses a box, and Player $A$ reveals the distance of the ball to the chosen box and then moves the ball to an adjacent box.

2. **Understanding the Distance**: When Player $B$ chooses a box, Player $A$ reveals the distance of the ball to that box. This distance is the minimum number of steps along the edges of the $n$-gon to reach the ball from the chosen box.

3. **Movement of the Ball**: After revealing the distance, Player $A$ moves the ball to an adjacent box. This means that the ball can only move to one of the two neighboring boxes.

4. **Strategy for Player $B$**: To guarantee finding the ball, Player $B$ needs to systematically reduce the possible locations of the ball. The key is to use the information about the distance and the movement pattern of the ball.

5. **Step-by-Step Strategy**:
   - **Step 1**: Player $B$ chooses any box, say box $1$. Let the distance revealed be $d_1$.
   - **Step 2**: Player $A$ moves the ball to an adjacent box. Now, the ball can be in one of the two boxes adjacent to the original box where it was.
   - **Step 3**: Player $B$ chooses one of the two possible boxes where the ball could have moved. Let the new distance be $d_2$.
   - **Step 4**: Player $A$ moves the ball again to an adjacent box. Now, Player $B$ has two possible locations for the ball again.
   - **Step 5**: Player $B$ continues this process, each time narrowing down the possible locations of the ball based on the distances revealed and the movement pattern.

6. **Guaranteed Win**: To guarantee a win, Player $B$ needs to ensure that the ball is found within a finite number of steps. The strategy involves systematically checking each box and using the distance information to eliminate possibilities.

7. **Least Number of Steps**: The least number of steps required for Player $B$ to guarantee finding the ball can be determined by considering the worst-case scenario. In the worst case, Player $B$ needs to check each box at least once and use the distance information to track the ball's movement.

8. **Conclusion**: The least number of steps for which Player $B$ can guarantee to win is $n$. This is because, in the worst case, Player $B$ needs to check each of the $n$ boxes once to ensure that the ball is found.

The final answer is $\boxed{n}$.