## Weekend Programming Challenge – Week #61 solutions

We got 24 solutions this weekend:

• Python x11
• C++ x4
• Java x3
• PHP x2
• C# x1
• Pascal x1
• Matlab x1

the solutions are uploaded on GitHub

1. kantal
Jul 16, 2014 @ 23:37:14

Dylan has two solutions and one of them, sol#3 is very interesting.

• Thanks!

2. Maybe it was not required, but wich of the solutions finds this one “-1+2-3+4+5+6+78+9 = 100”?

• At least solution 5 (mine) does.
There might be more, but I have not checked them all.

• kantal
Jul 18, 2014 @ 13:22:19

You can play around with ‘+-*’, too :), but ‘*1’ must be handled.

3. GAY Nicolas
Jul 18, 2014 @ 23:01:21

Mine also (solution 10, in cpp) found -1+2-3+4+5+6+78+9 = 100

How many solution were found by each of you; for me:
-1+2-3+4+5+6+78+9=100
+1+2+3-4+5+6+78+9=100
+1+2+34-5+67-8+9=100
+1+23-4+5+6+78-9=100
+1+23-4+56+7+8+9=100
+12-3-4+5-6+7+89=100
+12+3+4+5-6-7+89=100
+12+3-4+5+67+8+9=100
+123-4-5-6-7+8-9=100
+123+4-5+67-89=100
+123+45-67+8-9=100
+123-45-67+89=100