FOR h = 1 TO 7
used(h) = 1
FOR u = 0 TO 7
IF used(u) = 0 THEN
used(u) = 1
FOR i = 0 TO 7
IF used(i) = 0 THEN
used(i) = 1
FOR t = 0 TO 7
IF used(t) = 0 THEN
used(t) = 1
sod1 = h + u + i + t
huit = t + 8 * (i + 8 * (u + 8 * h))
FOR n = 1 TO 8
IF used(n) = 0 THEN
used(n) = 1
FOR e = 0 TO 8
IF used(e) = 0 THEN
used(e) = 1
FOR f = 0 TO 8
IF used(f) = 0 THEN
used(f) = 1
sod2 = n + e + u + f
neuf = f + 9 * (u + 9 * (e + 9 * n))
IF huit = neuf - 1 AND sod1 = sod2 - 1 THEN
PRINT h; u; i; t, n; e; u; f, huit, neuf
END IF
used(f) = 0
END IF
NEXT
used(e) = 0
END IF
NEXT
used(n) = 0
END IF
NEXT
used(t) = 0
END IF
NEXT
used(i) = 0
END IF
NEXT
used(u) = 0
END IF
NEXT
used(h) = 0
NEXT
finds
as
decimal
H U I T N E U F huit neuf
value value
5 4 7 0 3 8 4 2 2872 2873
|
Posted by Charlie
on 2013-12-27 17:29:39 |