CLS
FOR a = 1 TO 9
FOR b = 0 TO 9
FOR c = 0 TO 9
FOR d = 0 TO 9
FOR e = 0 TO 9
tot = a * a * a * a * a
tot = tot + b * b * b * b * b
tot = tot + c * c * c * c * c
tot = tot + d * d * d * d * d
tot = tot + e * e * e * e * e
tot2 = a * 10000 + b * 1000 + c * 100 + d * 10 + e
IF tot = tot2 THEN PRINT tot2
NEXT
NEXT
NEXT
NEXT
NEXT
gives
54748
92727
93084
By inspection, the one without repeated digits is 93084. |