Tap here to switch tabs
Problem
Submissions

Problem: Number of Dice Rolls With Target Sum

med
30 min
Try to solve the Number of Dice Rolls With Target Sum problem.

Statement

You are given n dice, where each die has k faces numbered from 11 to k.

Return the total number of possible ways to roll the dice such that the sum of the face-up values equals target. Since the answer can be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n, k ≤30\leq 30

  • 1≤1 \leq target ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Dice Rolls With Target Sum

med
30 min
Try to solve the Number of Dice Rolls With Target Sum problem.

Statement

You are given n dice, where each die has k faces numbered from 11 to k.

Return the total number of possible ways to roll the dice such that the sum of the face-up values equals target. Since the answer can be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n, k ≤30\leq 30

  • 1≤1 \leq target ≤1000\leq 1000