In this challenge you will take two inputs One input will be a string of numbers of any length which you will put into an array/table/whatever you call it in your language Ex:
10 10 145 20 53 102 20
Would become
arraynameofyourchoice = {10, 10, 145, 20, 53, 102, 20}
You can assume the input will have spaces in between each number and no newlines.
The second input will be our sum, which will be a number Ex:
165
Your challenge is to make a script that will search through your array and find every possible way to get 165 by adding numbers in the array. You can output your code in any way that clearly shows what numbers you are adding.
So in our example the output would be:
10, 10, 145
145, 20
53, 102, 10
Because each of those sequences of numbers added together equal 165
Note that even though there are 2 twenties in the sequence we did not output
145, 20
twice. You can never have a repeated sequence. Your code will take a +5 byte penalty if it does something like this:
145, 20
20, 145
This is fastest code challenge so fastest code wins! good luck!