#C519. Pascal Triangle Row Generator

    ID: 48811 Type: Default 1000ms 256MiB

Pascal Triangle Row Generator

Pascal Triangle Row Generator

Given a non-negative integer (n), generate the (n)-th row of Pascal's Triangle. In Pascal's Triangle, every element at position (k) in row (n) is computed as (C(n, k) = \frac{n!}{k!(n-k)!}). For instance, when (n = 3), the generated row should be: 1 3 3 1. This problem tests your ability to work with combinatorial formulas and iterative computations.

inputFormat

The input consists of a single line containing a non-negative integer (n) (0-based index), which represents the row of Pascal's Triangle to generate.

outputFormat

Output the elements of the (n)-th row of Pascal's Triangle separated by a single space. A newline character should follow the output.## sample

0
1

</p>