#C5979. Generate the nth Row of Pascal's Triangle

    ID: 49687 Type: Default 1000ms 256MiB

Generate the nth Row of Pascal's Triangle

Generate the nth Row of Pascal's Triangle

In this problem, you are given a non-negative integer ( n ) representing the index (0-indexed) of a row in Pascal's Triangle. Your task is to compute and output the ( n )th row of Pascal's Triangle. Recall that the element in the ( k )th position of the ( n )th row is given by the binomial coefficient:

(nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!}

For example, when ( n = 3 ), the row is: 1 3 3 1.

inputFormat

The input consists of a single line containing an integer ( n ) (0 ≤ ( n ) ≤ 10,000), which denotes the index of the desired row in Pascal's Triangle.

outputFormat

Output the ( n )th row of Pascal's Triangle as space-separated integers in a single line.## sample

0
1