So task is simple, given array of numbers and result, you need to find what operations you need to use on numbers from array , to obtain requested result.
Let's make it simple for start, and allow only basic operations such as: addition, subtraction, multiplication and division.
Example:
Input : [5,5,5,5,5] 100
Output : 5*5*5-5*5
To give some advantage to languages like Java, request is to implement function, not entire program, and result can be return via parameter or print to console.
Code is scored based on amount bytes, and as it's golf code challenge, lowest score wins.
Another requirment is You can get additional -10 points if for array contains only digids, support solutions where you could construct numbers from following digits.
Ie
Input : [1,2,3,4,5] 0
Output : 12-3-4-5
Note that, provided outputs are proposed outputs, some cases might have more than one solution. It's up to you will you provide one or more solutions for given task.
EDIT: Result has to be valid from mathematical point of view, hence division is rational division, not integer, and operation precedence is same as in classical math (first multiplication and division then addition and subtraction).
*
and/
have precendence over+
and-
? Your two examples contradict each other. \$\endgroup\$