Sunday Times Teaser 2569 – Christmas Gift
I sent Hank, an American friend, a Times subscription for a Christmas present. He is pleased and has responded with this numerical addition sum with a prime total in which he has consistently replaced digits by letters, with different letters for different digits
G E E
A
X M A S
T R E E
G I F T
=========
T I M E S
What is TIMES?
One Comment
Leave one →
-
Brian Gladman permalink12345678910from number_theory import is_primefrom alphasum import AlphaSums = AlphaSum(['GEE', 'A', 'XMAS', 'TREE', 'GIFT'], 'TIMES')for sol in s.solve():r = s.result(sol)if is_prime(r[1]):print('Times: {}, Summands: {}.'.format(r[1], tuple(r[0])))
Published: 18 December 2011 (link)