1155. Number of Dice Rolls With Target Sum
Medium
Input: n = 1, k = 6, target = 3
Output:
1
Explanation:
You throw one die with 6 faces.
There is only one way to get a sum of 3.Input: n = 2, k = 6, target = 7
Output:
6
Explanation:
You throw two dice, each with 6 faces.
There are 6 ways to get a sum of 7: 1+6, 2+5, 3+4, 4+3, 5+2, 6+1.Last updated