NeetCode #734LC-1155Medium2-D Dynamic Programming
← Back to All Problems#734 · #1155 · Number of Dice Rolls With Target Sum(掷骰子等于目标和的方法数)
📌 Problem Statement & Constraints
You roll
n dice, each with k faces numbered 1 to k. Return the number of ways the face-up numbers can sum to target, modulo 1e9+7. Constraints: 1 <= n, k <= 30, 1 <= target <= 1000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!