Sunday Times Teaser 2555 – Today’s Value
by Bob Walker
Published: 11 September 2011 (link)
_____ | _____ | S | ||||||
U | N | |||||||
D | A | Y | ||||||
T | I | M | E |
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?
2 Comments
Leave one →
-
Brian Gladman permalink12345678910111213141516from itertools import permutations# permute the bricks for the bottom row (TIME)for T, I, M, E in permutations(range(1, 11), 4):# now compute the other values from the bottom upD, A, Y = abs(T - I), abs(I - M), abs(M - E)U, N = abs(D - A), abs(A - Y)S = abs(U - N)# and check they are numbered from one to tent = sorted([S, U, N, D, A, Y, T, I, M, E])if U == 1 and t[0] == 1 and len(set(t)) == 10:print('DAY = {}'.format(100 * D + 10 * A + Y))
-
geoffrounce permalink1234567891011121314from itertools import permutationsu = 1for p in permutations (range(2, 11)):s, n, d, a, y, t, i, m, e = pif s != abs(u - n) : continueif u != abs(d - a) : continueif n != abs(a - y) : continueif d != abs(t - i) : continueif a != abs(i - m) : continueif y != abs(m - e) : continueprint('DAY = ', d, a, y)