Define $\mathrm{SuperSum}(0, n) = n$ and $\mathrm{SuperSum}(k, n) = \sum_{i=1}^{n} \mathrm{SuperSum}(k-1, i)$. Answer $T$ queries: for each $k$, $n$ print $\mathrm{SuperSum}(k, n)$ (which equals $\binom{n+k}{k+1}$).
Input
Line 1: $T$ ($1 \le T \le 100$). Next $T$ lines: $k$ and $n$ ($1 \le k, n \le 14$).
Output
Print $\mathrm{SuperSum}(k, n)$ for each query, one per line.
Example 1
Input
4 1 3 2 3 4 10 10 10
Output
6 10 2002 167960
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.