#include
int prod[4000001];
int valid[3001];
int good[1001][1001];
int r = 3;
int p = 100;
int main()
{
int i, j, k, t;
for (i = r; i
for (j = i; j
prod[i * j]++;
}
}
for (i = r * 2; i
valid[i] = 1;
for (j = r; j
if (j > p) continue;
if (prod[j * (i - j)]
}
}
for (i = r; i
for (j = i; j
if (!valid[i + j]) continue;
k = i * j;
good[i][j] = 1;
for (t = r; t * t
if (t != i && t + k / t
}
}
}
for (i = r; i
for (j = i; j
if (!good[i][j]) continue;
for (k = r; k
t = i + j - k;
if (k > t || t > p) continue;
if (i != k && good[k][t]) break;
}
if (k > i + j) printf("%d %dn", i, j);
}
}
return 0;
}
yes my code follows exactly what you said.
所有跟帖:
•
回複:yes my code follows exactly what you said.
-巡天劍客-
♂
(174 bytes)
()
09/08/2010 postreply
03:54:50
•
高手- well-done~
-guest007-
♀
(0 bytes)
()
02/13/2010 postreply
18:35:07