Execution time limit is 1 second Runtime memory usage limit is 128 megabytes The numbers a,b,c are given. Implement the recursive function:
f(n)=⎩⎨⎧0,n<0a,n=0f(n−1)+b⋅f(n−2)+c,n>0 Input
Four nonnegative integers a,b,c (a,b,c≤1000),n (0≤n≤1000).
Output
Print the value of f(n) modulo 109+7.
Examples