12,253,371 members (51,955 online)
Rate this:
See more:
Here is a problem in my hand that I need so solve it. It sounds like this: Given a number (between 4 and 30000) x, which is the greatest number that can be written as a product of numbers that have the sum x.

Example:
For x = 7 the result is 12.
Explanation:
7 = 2 + 2 + 3
and the greatest product is
12 = 2 x 3 x 3

I do not want to abridge the path for solving the problem and I do not want complete code for this problem. I only need some directions and documentation about the method that I could use in order to solve it.
Posted 21-Dec-09 5:19am
catcit400
Edited 21-Dec-09 5:20am
v2

Rate this:

Solution 1

First decide how you will check it manually.
Write it on a piece of paper.

You could then ask specific questions on that here.
Rate this:

Solution 2

I suspect the answer is always going to be 2x2x2... for even numbers and 3x2x2x2.... for odd numbers. If that is true, then the problem becomes much easier.
Rate this:

Solution 3

Hi ,

Christian Graus is correct if you go by his way you will get proper solution.

Top Experts
Last 24hrsThis month
 CHill60 465 F-ES Sitecore 360 OriginalGriff 280 George Jonsson 255 Sergey Alexandrovich Kryukov 250
 OriginalGriff 1,838 CHill60 1,370 ppolymorphe 1,264 George Jonsson 1,105 Dave Kreskowiak 992