#t477. 我爱读书

我爱读书

I Love Reading

Problem Description

Teacher Shi distributes 2n2n distinct books evenly among nn students numbered 1,2,3...n1,2,3...n. How many different ways are there to do this?

Input Format

One line: an integer  n\,n (1≤n≤101 \le n \le10).

Output Format

One line: an integer, the correct answer to the problem.

Sample Input

3

Sample Output

90

Hint

📚 Topic tag: this problem belongs to the combinatorial counting topic. It is not a loop problem and is placed here as optional material. If you have just started learning loops, feel free to skip it and come back when you have spare time.

Hint: the idea of "multiplying step by step" is already laid out in the hint area; just keep multiplying the binomial coefficients.

Distributing 6 distinct books to 3 students can be split into three stages:

  • There are C62C_6^2 ways to choose the books for the first student;
  • There are C42C_4^2 ways to choose the books for the second student;
  • There are C22C_2^2 ways to choose the books for the third student.

In total there are $C_6^2\times C_4^2\times C_2^2=15\times 6\times 1=90$ ways.