A=0, B=6, C=8, N=3, EDGE = 2592
Integ{0..6} 8x^3 dx = 2592
as Integ{A..B} C*x^N dx = C * (B^(N + 1) - A^(N + 1)) / (N + 1):
FOR a = 0 TO 9
used(a) = 1
FOR b = 0 TO 9
IF used(b) = 0 THEN
used(b) = 1
FOR c = 0 TO 9
IF used(c) = 0 THEN
used(c) = 1
FOR n = 0 TO 9
IF used(n) = 0 THEN
used(n) = 1
num = INT(c * (b ^ (n + 1) - a ^ (n + 1)) + .5)
den = n + 1
edge = num / den
IF edge = INT(edge) AND edge > 1000 AND edge < 10000 THEN
IF edge \ 1000 = edge MOD 10 THEN
e = edge MOD 10
d = (edge \ 100) MOD 10
g = (edge \ 10) MOD 10
IF used(e) = 0 AND used(d) = 0 AND used(g) = 0 THEN
IF e <> d AND d <> g AND e <> g THEN
PRINT a; b; c, n, edge
END IF
END IF
END IF
END IF
used(n) = 0
END IF
NEXT
used(c) = 0
END IF
NEXT
used(b) = 0
END IF
NEXT
used(a) = 0
NEXT
|
Posted by Charlie
on 2009-03-25 13:44:35 |