Teaser 2555: Today’s value
From The Sunday Times, 11th September 2011 [link] [link]
These 10 children’s bricks are numbered from 1 to 10. Where a brick rests on two others its number is the difference of their two numbers. Given that U = 1 …
What is the number DAY?
[teaser2555]

Jim Randell 6:46 am on 24 April 2025 Permalink |
Here is a solution using the [[
SubstitutedExpression]] solver from the enigma.py library.The following run file executes in 78ms. (Internal runtime of the generated code is 331µs).
Solution: DAY = 672.
At least the digits have values: D = 6, A = 7, Y = 2.
But since the digits go from 1 to 10, you could argue that the result is expressed in base 11, so:
LikeLike
Ruud 6:14 am on 28 April 2025 Permalink |
Brute force one liner:
import itertools print( *( f"{d}{a}{y}" for s, n, d, a, y, t, i, m, e in itertools.permutations(range(2, 11), 9) if s == abs(1 - n) and 1 == abs(d - a) and n == abs(a - y) and d == abs(t - i) and a == abs(i - m) and y == abs(m - e) ) )LikeLike
Frits 10:51 am on 26 April 2025 Permalink |
# S # U N U = 1 # D A Y # T I M E sols = set() U, mx = 1, 10 r0 = set(range(2, mx + 1)) # remaining digits to use for N in range(2, mx - 1): # no using <mx - 1> and <mx> on this level S = N - U r1 = r0 - {N, S} if len(r1) != len(r0) - 2: continue for A in r1 - {mx}: r2 = r1 - {A} for D in (A - U, A + U): if D not in r2 or D == mx: continue r3 = r2 - {D} for Y in (A - N, A + N): if Y not in r3 or Y == mx: continue r4 = r3 - {Y} if max(r4) - min(r4) < max(D, A, Y): continue for I in r4: for M in (I - A, I + A): if M not in r4: continue for T in (I - D, I + D): if T not in r4: continue for E in (M - Y, M + Y): if {T, I, M, E} != r4: continue sols.add(100 * D + 10 * A + Y) print("answer(s):", ' or '.join(str(s) for s in sols))LikeLike