10. (5 points) Person A and Person B together bought $n$ basketballs, each costing $n$ yuan. When paying, A goes first, followed by B, paying 10 yuan at a time, and when the remaining amount to be paid is less than 10 yuan, it is B's turn to pay. After the full payment is made, to ensure that both A and B have paid the same amount, B should give A $\qquad$ yuan.
【Solution】Solution: The tens digit of $n^{2}$ is odd. Since B pays the last, and it does not exceed 10 yuan, according to the properties of perfect squares, the number of basketballs must be more than 6 (the number of payments is more than twice). If the number of payments is only twice, then the number of basketballs can be 4, so the unit digit of $n$ must be 4 or 6, thus the unit digit of $n^{2}$ is 6, B paid 6 yuan the last time, and should give A:
$(10-6) \div 2=2$ (yuan).
Answer: B should give A 2 yuan.
The answer is: 2.