无心人 发表于 2008-12-11 15:43:57

10个因子的
129600    9 5 4 2 2 2 1 1 1 1

无心人 发表于 2008-12-11 16:30:49

11个因子的
155520    8 4 3 2 2 2 1 1 1 1 1

medie2005 发表于 2008-12-11 16:43:31

7 4 2 2 1 1 1 1 1 1 1 1 1    factors : 184320

无心人 发表于 2008-12-11 16:49:36

12的
168960    10 4 3 2 1 1 1 1 1 1 1 1

无心人 发表于 2008-12-11 16:52:02

13的
184320    7 4 2 2 1 1 1 1 1 1 1 1 1

无心人 发表于 2008-12-11 16:54:13

14个因子的
153600    4 4 2 1 1 1 1 1 1 1 1 1 1 1

无心人 发表于 2008-12-11 16:56:37

因此该问题答案
最多有13个不同素因子
184320个因子   
2^7*3^4*5^2*7^2*11*13*17*19*23*29*31*37*41 = 18401055938125660800

无心人 发表于 2008-12-11 16:58:05

C 测试程序, 适合于8个以上因子
=================================
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void)
{
int a,b,c,d,e,f,g,h,i,j,k, l, m, n;
double l2,l3,l5,l7,l11,l13,l17,l19,l23,l29,l31,l37, l41, l43;
double t1, t2, t3;
int max, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, s;
int mm1, mm2, mm3;
l2 = 1.0;
l3 = log(3) / log(2);
l5 = log(5) / log(2);
l7 = log(7) / log(2);
l11 = log(11) / log(2);
l13 = log(13) / log(2);
l17 = log(17) / log(2);
l19 = log(19) / log(2);
l23 = log(23) / log(2);
l29 = log(29) / log(2);
l31 = log(31) / log(2);
l37 = log(37) / log(2);
l41 = log(41) / log(2);
l43 = log(43) / log(2);

max = 0; s = 0;
m1 = m2 = m3 = m4 = 0;
m5 = m6 = m7 = m8 = 0;
m9 = m10 = m11 = m12 = 0;
m13 = m14 = 0;
for (a = 1; a <= 10; a++)
for (b = 1; b <= 8; b++)
for (c = 1; c <= 6; c++)
for (d = 1; d <= 4; d++)
for (e = 1; e <= 4; e++)
for (f = 1; f <= 4; f++)
for (g = 1; g <= 4; g++)
for (h = 1; h <= 3; h++)
for (i = 1; i <= 3; i++)
for (j = 1; j <= 3; j++)
for (k = 1; k <= 3; k++)
for (l = 1; l <= 2; l++)
for (m = 1; m <= 2; m++)
for (n = 1; n <= 2; n++)
{
    t1 = a * l2 + b * l3 + c * l5 + d * l7;
    t2 = e * l11 + f * l13 + g * l17 + h * l19;
    t3 = i * l23 + j * l29 + k * l31 + l * l37 + m * l41 + n * l43;
    s ++;
    //printf("%f ", t1 + t2 + t3);
    if ((t1 + t2 + t3) <= 64.0)
    {
      mm1 = (a+1)*(b+1)*(c+1)*(d+1);
      mm2 = (e+1)*(f+1)*(g+1)*(h+1);
      mm3 = (i+1)*(j+1)*(k+1)*(l+1)*(m+1)*(n+1);
//       printf("%d: %d", s, mm1 + mm2 + mm3);
      if (mm1*mm2*mm3 > max)
      {
            max = mm1 * mm2 * mm3;
            m1 = a; m2 = b; m3 = c; m4 = d;
            m5 = e; m6 = f; m7 = g;m8 = h;
            m9 = i; m10 = j; m11 = k; m12 = l;
            m13 = m; m14 = n;
      }
    }
}
printf("Search %d\n", s);
printf("14: %d    %d %d %d %d %d %d ", max,m1, m2, m3, m4, m5, m6);
printf("%d %d %d %d %d %d %d %d", m7, m8, m9, m10, m11, m12, m13, m14);
}

无心人 发表于 2008-12-11 17:01:51

Media2005啊
不要去掉帖子修改时间
好不好啊
呵呵

gxqcn 发表于 2008-12-11 17:14:04

对不起,13# 可能是我误去的。
页: 1 [2] 3
查看完整版本: 来个简单的,求n以内因数最多的数