Jump to navigation Jump to search
10943 - How do you add?
Find the number of ways to form Number N from the addition of K numbers less than N.
Observing that the number of ways are N+K-1 C K-1, we precompute the values and answer query in O(1).
Output is mod 1e6.
63 59 100 100 0 0