Given n dice each with m faces, numbered from 1 to m, find the number of ways to get sum X. X is the summation of values on each face when all the dice are thrown.
Input: The first line of the input contains T denoting the number of test cases. First line of test case is faces 'm', number of throws 'n' and the sum to obtain 'x'.
Output: Number of ways to get sum 'x' are displayed.
1 <= T <= 100
1 <= m,n,x <= 50
6 3 12
10 8 25
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.