Teaser 1978: Sunday study
From The Sunday Times, 13th August 2000 [link]
This TEASER is odd and it needs careful STUDY. Throughout, different letters consistently stand for different non-zero digits. Each letter on the lower line is the sum of the two letters above it (so that, for example, U = A + S).
What is SUNDAY‘s number?
[teaser1978]

Jim Randell 10:47 am on 11 May 2023 Permalink |
See also: Teaser 1688, Teaser 2533.
We can solve this puzzle using the [[
SubstitutedExpression]] solver from the enigma.py library.The following run file executes in 66ms. (Internal runtime of the generated program is 80µs).
Run: [ @replit ]
Solution: SUNDAY = 469528.
LikeLike
GeoffR 12:09 pm on 11 May 2023 Permalink |
LikeLike
GeoffR 1:47 pm on 11 May 2023 Permalink |
from itertools import permutations digits = {1, 2, 3, 4, 5, 6, 7, 8, 9} for p1 in permutations(range(1, 10), 4): T, E, A, S = p1 if S != T + E:continue if T != E + A:continue # find 5 remaining digits q1 = digits.difference(p1) for p2 in permutations(q1): U, D, R, Y, N = p2 if U != A + S:continue if D != S + E:continue if R % 2 != 1:continue # TEASER is odd if Y != E + R:continue SUNDAY = 100000*S + 10000*U + 1000*N + 100*D + 10*A + Y print('SUNDAY = ', SUNDAY)LikeLike