Start with a = [1, 1, ..., 1] of length n. Each second, update simultaneously:
for all i. Return a[n-1] after k seconds, modulo 1_000_000_007.
Key fact: After k steps,
So compute a single binomial coefficient modulo .
Input: n = 5, k = 3
Output: 35
Input: n = 4, k = 5
Output: 56
Input: n = 1, k = 100
Output: 1
Accepted:
Submission: