Each of A, B, C, D, E and F is a positive integer with A ≤ B ≤ C ≤ D ≤ E ≤ F ≤ 25.
Determine the total number of sextuplets (A ,B, C, D, E, F) such that (A+B+C)*(D+E+F) is divisible by 75.
FOR a = 1 TO 25
FOR b = a TO 25
FOR c = b TO 25
FOR d = c TO 25
FOR e = d TO 25
FOR f = e TO 25
tst = (a + b + c) * (d + e + f)
IF tst MOD 75 = 0 THEN PRINT a; b; c, d; e; f, tst: ct = ct + 1
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
PRINT ct
finds 26550 such sextuplets out of 593775 formable sextuplets.

Posted by Charlie
on 20110504 19:28:28 