If you haven't learned permutation and combination, you can also understand it in the following ways:
Suppose * * * has X companies, then the first company has * * signed (x- 1) contracts with other companies, and the second company has also signed (x- 1) contracts, then these X companies have * * signed x(x- 1). However, it should be noted that this calculation will calculate all contracts twice. Taking the contract signed by the first company and the second company as an example, we calculated it twice in the above process. So the total number of * * * contracts should be x(x- 1)/2, which is 45.
It can be seen that the equations obtained by the two methods are the same, but the solutions are different.
Solve the problem? x(x- 1)/2=45