All tasks
Mediummathdp

Row of Pascal Triangle

Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0

Statement

You are given an integer n. Print row n of Pascal triangle: n + 1 numbers C(n, 0), C(n, 1), …, C(n, n) on one line separated by spaces. Rows are numbered from zero: row 0 is a single 1.

Examples

Example 1
Input
4
Output
1 4 6 4 1
Example 2
Input
0
Output
1

Constraints

  • 0 ≤ n ≤ 60
Solve this task to unlock the editorial.

AI tutor

Stuck? Get a nudge — the tutor explains the idea, it never hands you the solution.