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. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100.
napisałem to w cpp, ale wydaje mi się, że da się to zrobić dużo lepiej w jakimś języku skryptowym, jak się komuś będzie nudzić to zapraszam
tutaj moje rozwiązanie:
http://melpon.org/wandbox/permlink/U7xIu3EgzgkF2ocC
dodanie znacznika <quote>
- @furious programming