Problem A
Generalized Recursive Functions
You have been employed by the math department to find the solutions to different recursive, integer-valued functions. Every function is of the form:
where all parameters
Input
Input starts with an integer
Output
For each
Sample Input 1 | Sample Output 1 |
---|---|
2 2 0 1 0 0 1 0 0 1 0 1 1 2 1 3 1 4 1 5 1 6 1 1 0 0 1 1 1 1 0 0 0 20 20 |
1 1 2 3 5 8 13 21 0 130271906898720 |