Divide and Count I have question that I can't understand it and I don't know how should I solve it.
here is the whole question:
Jack has several beautiful diamonds, each of them is unique thus precious. To keep them safe, he wants to divide and store them in different locations. First, he has bought some coffers. These boxes are identical except that their capacities (the number of the diamonds that a box can contain) may diverse. Before he puts his diamonds in, he wants to figure out how many different ways he can store these diamonds into the coffers
For example: We have 2 coffers with capacity 3, with 6 different diamonds and the answer is 10 way   
First:can you tell me why the answer is 10.
Second:Is there any formula or special way to calculate this
 A: This has to do with binomial coefficients. The number $\binom{n}{k}$ is the way of picking $k$ things out of $n$ without considering their order. These coefficients are defined as $\binom{n}{k}=\dfrac{n!}{k!(n-k)!}$ for natural numbers $k\leq n$. Clearly, we have $\binom{n}{n}=1=\binom{n}{0}$. 
Thus, you can pick $3$ of your $6$ diamonds to put it in the first box, then the remaining 3 must go in the other box. There are $\binom{6}{3}\binom{3}{3}=\dfrac{6!}{3!3!}\cdot1=\dfrac{6\cdot5\cdot4}{6}=20$ ways of doing this. 
However, in this case the boxes are identical, so we have actually counted each way twice. To see this say we put diamonds $d_1,d_2,d_3$ in the first box, then $d_4,d_5,d_6$ go in the second. This is one way, but we also count the way in which $d_4,d_5,d_6$ go in the first and $d_1,d_2,d_3$ go in the second. Since the boxes are identical, these two arrangements are the same. Thus, we must divide our number of ways by $2$.
So the correct answer is $\dfrac{20}{2}=10$.
As for your second question, applying these general ideas with some combinatorial thinking should get you the right results.
A: First : You first choose three diamonds from six diamonds, and put them in the coffer $A$. Then, you put the other three diamonds in the coffer $B$.
The number of ways is $\binom{6}{3}=20$. 
However, in your case, your coffers are name-less. So, we need to divide it by $2!.$
So, the answer is $\binom{6}{3}/2!=10.$
Second : If you have $m$ coffers with capacity $n$, with $m\times n$ different diamonds, then the answer is
$$\binom{mn}{n}\cdot\binom{mn-n}{n}\cdots\binom{2n}{n}/m!=\frac{(mn)!}{m!(n!)^m}.$$
