6.4. Three pirates, Joe, Bill, and Tom, found a treasure containing 110 identical gold coins, and they want to divide them so that each of them gets at least 30 coins. How many ways are there to do this?
Solution. Since $n=110, k=30$, we get $C_{22}^{2}=231$ ways.

Answer: 231.

![](https://cdn.mathpix.com/cropped/2024_05_06_a8c31eb257d724803ce6g-08.jpg?height=103&width=1536&top_left_y=591&top_left_x=317)
Solution. Let $A=\underbrace{11 \ldots 1}_{1007}$. Then

$$
\sqrt{\underbrace{111 \ldots 11}_{2014}-\underbrace{22 \ldots 2}_{1007}}=\sqrt{A \cdot 10^{1007}+A-2 A}=\sqrt{A(9 A+1)-A}=3 A=\underbrace{33 \ldots 3}_{1007} .
$$

Answer: 3021

![](https://cdn.mathpix.com/cropped/2024_05_06_a8c31eb257d724803ce6g-08.jpg?height=94&width=1530&top_left_y=1021&top_left_x=320)
Solution. The number is $\underbrace{66 \ldots 6}_{1007}$.

Answer: 6042.