You are given A dices with faces numbered from 1 to B.
You have to find out the number of ways to get to sum C.
Since, the number can be large, output the answer modulo 109 + 7.
A = 2 B = 4 C = 5
A = 2 B = 4 C = 1
There are 4 different ways to arrange the dices - [1, 4], [2, 3], [3, 2], [4, 1].
Since, the dices are numbered from 1. 2 dices will have the minimum sum of 2. Therefore, there are zero ways to get to sum 1.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.