分区号的产生 [英] The produc of partition`s numbers
问题描述
这是我手中的一个问题,需要解决.听起来是这样的:给定一个数字(介于4到30000之间)x,它是可以写为具有x和的数字的乘积的最大数字.
示例:
对于x = 7,结果为12.
说明:
7 = 2 + 2 + 3
最好的产品是
12 = 2 x 3 x 3
我不想删节解决问题的方法,也不想为这个问题提供完整的代码.我只需要一些有关可以用来解决该问题的方法的说明和文档.
首先确定您将如何手动对其进行检查.
写在一张纸上.
然后从您的程序开始.
然后您可以在此处提出具体问题.
我怀疑答案始终是2x2x2 ...对于偶数,3x2x2x2 ....对于奇数.如果是这样,那么问题就变得容易多了.
克里斯蒂安·格劳斯(Christian Graus)是正确的,如果您走他的路,您将得到适当的解决方案.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.解决方案First decide how you will check it manually.
Write it on a piece of paper.
Then start with your program.
You could then ask specific questions on that here.
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.
Hi ,
Christian Graus is correct if you go by his way you will get proper solution.
这篇关于分区号的产生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!