7
1
Prelude:
This task is taken from Five Problems Every Software Engineer Should Be Able to Solve in Less Than an Hour, which I really recommend.
The task:
Write a program that outputs all possibilities to put + or - or nothing between the numbers 1, 2, ..., 9 (in this order) such that the result is always 100.
Winning Criteria:
Shortest code in bytes wins.
Are spaces allowed between the numbers, like
1 2 3+4+5
rather than123+4+5
? – Tim – 2015-05-10T16:27:08.2331
Pretty similar to http://codegolf.stackexchange.com/questions/3019/getting-an-answer-from-a-string-of-digits (this link allows for
– Kyle Kanos – 2015-05-10T17:44:37.223*
&/
and does not specify the target 100)