Saturday, March 27, 2010

A Simple Equation

Something for the Weekend:-
1 + 23 - 4 + 5 - 6 + 78 + 9 = 106
The digits 1 through 9 are used in order to arrive at 106.
Using 1 through 9 in order, and using only addition or subtraction, create an equation that equals 100.

- Karl

Labels:

6 Comments:

Blogger SpArKo said...

I have seen this question before also but didnt tried to solve it then. But managed to calculate the answer now..
Here are some equations..

12+3-4+5+67+8+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

March 27, 2010 10:50 PM  
Blogger SpArKo said...

Made a few more:

12+3+4+5-6-7+89=100
12-3-4+5-6+7+89=100
123+4-5+67-89=100
123-4-5-6-7+8-9=100
123-45-67+89=100

March 27, 2010 10:54 PM  
Blogger Karl Sharman said...

As SpArKo shows - there are many ways.
Now try it with the 4 operands - +,-,/,x to get 100

March 28, 2010 6:02 AM  
Blogger Zayani82 said...

This is simple .... between any 2 digits there is 3 possibility, either + or - or nothing (thus making it bigger number with the digit that follow) , since there is 8 slots between digits from 1 to 9 ... total possible = 3^8=6561 possibility, you can try all 6561 possible and see which one give you the answer by writing simple script, something like this


for(i=0;i<6561;i++)
{
j= coverttobase3(i)
j=j.replace(0,"+");
j=j.replace(1,"-");
j=j.replace(0,"#");
s="1"
for(k=2;k<10;k++)
{
s=j.substr(k-2,1) + k
}
s.replace("#","")
eval("m=" + s)
if(m==100) Answer+= s + ", "

}

//i didn't test the code also you need the function coverttobase3 to be written

March 30, 2010 12:08 AM  
Blogger Eketahuna said...

Are we allowed to use ( ) ?

If so, how about:

(12 + 3) x 4 / 5 + 6 - 7 + 89 = 100

March 30, 2010 3:23 PM  
Blogger Karl Sharman said...

Well done Eketahuna. I havn't been able to find a solution without ( ).

March 31, 2010 12:05 AM  

Post a Comment

Links to this post:

Create a Link

<< Home