Teaser 2487: [Alphametic sum]
From The Sunday Times, 23rd May 2010 [link] [link]
I have taken an addition sum and consistently replaced digits with letters, using different letters for different digits. In this way, the sum has become:
THE + TOP + PAPER = TIMES
and this TEASER is odd.
What is the number TEASER?
This puzzle was originally published with no title.
[teaser2487]
Jim Randell 9:00 am on 14 November 2025 Permalink |
Here is a solution using the [[
SubstitutedExpression.split_sum]] solver from the enigma.py library.The following run file executes in 84ms. (Internal runtime of the generated code is 482µs).
Solution: TEASER = 809205.
The alphametic expression corresponds to two possible sums:
H and O are 3 and 6, but we don’t know which is which. The other values are fixed.
LikeLike
Ruud 8:41 am on 15 November 2025 Permalink |
Note that this extremely brute force solution requires istr 1.11.1 .
import peek import istr with peek(show_enter=False): for t, h, e, o, p, a, r, i, m, s in istr.permutations(range(10)): if istr(":=teaser").is_odd() and istr(":=the") + istr(":=top") + istr(":=paper") == istr(":=times"): peek(teaser, the, top, paper, times)LikeLike