Kth Row of Pascal's Triangle(Contest)
Kth Row of Pascal's Triangle easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Kth Row of Pascal's Triangle easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement :
Given an index K, return the K-th row of . You must print the K-th row modulo 109 + 7. The rows of Pascal's triangle are conventionally enumerated starting with row K=0 at the top (the 0th row)InputThe only line of input contains the input K. Constraints:- 0 β€ K β€ 3000 OutputPrint k-th row of Pascal's Triangle containing k+1 integers modulo 10^9+7.ExampleSample Input : 3 Sample Output: 1 3 3 1
link: