A Row of Pascal's Triangle
Print row N of Pascal's triangle (row 0 is 1), each entry modulo 109+7.
Input: one integer N.
Output: the N+1 entries C(N,0) ... C(N,N) mod 109+7.
Constraints:
- 0 ≤ N ≤ 105
Sample Tests
Input 1
4
Output 1
1 4 6 4 1
Input 2
0
Output 2
1
Discussion (opens after you solve — no spoilers before)
No comments yet.