View Single Post
Old 07-23-2008, 03:26 PM   #2 (permalink)
Shooter
Gone in 120 sec
 
Join Date: Mar 2008
Posts: 604
Shooter just joined TestMagic.
We need to make the length maximum. They have given that prime numbers can be distinct.

so we will start with least prime '2' and see that we use only this number. If we use distinct numbers we will get the length less than maximum.

x+3y<1000

Pick the numbers and make sure that the condition satisfies:

2^9=512 (X)
2^7 =128*3 = 348 (Y)

2^9+3*2^7 < 1000

Try next value:

2^10+3*2^7>1000 (condition is not satisfying)

=> 16 is the maximum length.
Shooter is offline   Reply With Quote