Re: make 100 by using 1, 7, 7, 7, 7



On 2007-11-13 13:51:55 -0500, Kira Yamato <kirakun@xxxxxxxxxxxxx> said:

On 2007-11-13 13:22:13 -0500, Robert Israel <israel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> said:

"Benjamin A. Bartsch" <benjamin.a.bartsch@xxxxxxxxx> writes:


dangerousgam...@xxxxxxxxx schrieb:
So, using only +, -, x, /, and parentheses, and ONLY these numbers:

1, 7, 7, 7, 7

how can you make 100? Is there more than one solution?

--> (1/7+7)*(7+7)

Benjamin

Yes, and that's the only solution (up to commutativity).

I'm very curious how you concluded this. Was it by a program that tests through all possible combinations?

I tried to write a program too, but I stop when I couldn't quickly find a way to list out all possible trees with 7 leaves.

Sorry, I meant 5 leaves. My idea was that each expression can be represented as a tree where each internal node is one of four operators +,-,*,/ and the leaves are one of the number 1,7,7,7,7.

--

-kira

.