Wednesday, April 13, 2011

SPOJ 1688. A Very Easy Problem! Problem code: EASYPROB

The problem asks you to output some form of these numbers: 137, 1315, 73, 136, 255, 1384, 16385, one per line in the listed order.

Let’s see the first line of the correct output:

137=2(2(2)+2+2(0))+2(2+2(0))+2(0)

Hmmm… I don’t want to take the fun out the problem by giving the answer directly to you. So, I will give you a clue.

The clue:

If you have been thinking in this direction :

How can I make the left hand side (in this case 137) to become the right hand side?

Stop thinking!

The right direction to think for this problem is:

How can I make the RIGHT HAND SIDE of the equation to become the left hand side?

Got it?

4 comments:

Anonymous said...

i guess knowledge is "POWER"

Anonymous said...

Okay, I tried a lot but still couldn't think of the answer.
Can you give a little more hint?

Anonymous said...

A little more hint also lies in the statement "Knowledge is POWER" made in the first comment!

Anonymous said...

Hey, the hint is POWER (Raise to the power :P ). Do it the following way:

2^{2^2 + 2 + 2^0} + 2^{2 + 2^0} + 2^0