isaacasimov
Programmer
Hi,
I was wondering if anybody can help me with this problem that I would like to solve. I just need some advices on how to start.
Given N dice (thus N lists of [1,2,3,4,5]) I need to find the possible combinations that give as result another number.
Example:
dice(P, N, L) where P is the number we want, N the number of dice and L the list
dice (5, 2, L)
L = [1, 4]
L = [2, 3]
L = [3, 2]
L = [4, 1]
I don't know if recursion is what I need here or not. I just need a clue, I really want to try and solve this problem by myself.
Greetings from Vaduz, Lichtenstein
I was wondering if anybody can help me with this problem that I would like to solve. I just need some advices on how to start.
Given N dice (thus N lists of [1,2,3,4,5]) I need to find the possible combinations that give as result another number.
Example:
dice(P, N, L) where P is the number we want, N the number of dice and L the list
dice (5, 2, L)
L = [1, 4]
L = [2, 3]
L = [3, 2]
L = [4, 1]
I don't know if recursion is what I need here or not. I just need a clue, I really want to try and solve this problem by myself.
Greetings from Vaduz, Lichtenstein