View Single Post
Old 07-23-2008, 04:57 PM   #3 (permalink)
Makumajon
TestMagic Guru
 
Makumajon's Avatar
 
Join Date: May 2008
Location: Bangladesh
Posts: 1,040
Makumajon is on the way!
x+3y<1000

To get the maximum length of x or y, you must try to make these integers using 2 as factor as many as possible, because 2 is the lowest prime and hence using it will increase the length more than using any other prime.

Now look again x+3y<1000. Of course, you will try to maximize the value of x and minimize the value of y (because y has already the multiple 3, 3y will increase quickly as y increases, but without effectively increaseing the length).

So, raise x so that it becomes quite close to 1000.
Suppose x=2^10=1024 (not possible).
Suppose, x=2^9=512 (choose it).

So, 3y<1000-512
3y<488
y<162.67

Say, y=2^7=128 (possible)
y=2^8=256 (impossible).

So, x's length is 9, while y's length is 7. Answer 9+7=16
Makumajon is offline   Reply With Quote