New Scientist Enigma 540 – Icarus Allsorts
by Chris Maslanka
From New Scientist #1692, 25th November 1989
“It takes all sorts to make a hang-gliders’ convention go with a whirl,” confided Icarus Thorns to the Rev E. B. Inept as they dallied over their tea on a mountain top.
“You can say that again,” answered his companion, dipping into the bag of proffered sweets and adding absent-mindedly another two lumps to his already sweetened tea. “You can say that again,” echoed the mountains faintly.
“This puzzle, unlike our jump, needs little preamble. In the (correct) equation:
ABC – D – E – F – G – H – I – J = 100
each of the letters stands for a different digit. All you have to do is deduce the value of:
(D × E × F × G × H × I × J) ÷ ABC
So saying, the intrepid Inept threw himself down off the outcrop, his wings glinting in the sun.
Can you deduce the answer before he reaches the bottom?
-
Brian Gladman permalink123456789101112from math import prodfor abc in range(128, 143):a, b, c = (int(c) for c in str(abc))s_abc = {a, b, c}if len(s_abc) == 3 and 0 in s_abc:p = prod(x for x in set(range(10)).difference({a, b, c}))q, r = divmod(p, abc)if q and not r:print(f"Answer = {q} (ABC = {abc}).")