You have n dice, and each die has k faces numbered 1 to k. Given three integers n, k, and target, return the number of possible ways (out of k^n total rolls) to roll the dice so the sum of the face up…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.