Teaser 2623: Latecomer
From The Sunday Times, 30th December 2012 [link] [link]
Imogen is having a New Year party tomorrow night and she has invited Madeline, hoping not to have a repeat of last year’s episode which completely spoilt the celebrations. Last New Year’s Eve Madeline had been due at a certain whole number of minutes past an hour but she was late, the number of minutes late being that same aforementioned “certain number of minutes” but with the digits in the reverse order. Madeline pointed out that at least the angle between the hands of the clock at the moment of her arrival was the same as it would have been when she was due.
At what time was she due to arrive?
[teaser2623]
Jim Randell 10:46 am on 15 August 2024 Permalink |
Madeline was expected to arrive at a time of xy minutes past a specified hour, but she was late, and arrived yx minutes later than her expected time. So yx (and xy) cannot be 00 (as then she would not be late).
This Python program finds both possible solutions to the puzzle.
It runs in 74ms. (Internal runtime is 3.6ms).
from enigma import (Rational, irange, cproduct, nrev, printf) Q = Rational() # calculate angle between hands at time h:m # angles are between 0 (coincident) and 1 (opposite) def angle(h, m): (x, m) = divmod(m, 60) h = (h + x) % 12 ah = Q(h + Q(m, 60), 6) am = Q(m, 30) a = abs(ah - am) return (2 - a if a > 1 else a) # consider possible scheduled arrival times for (h, m) in cproduct([irange(0, 11), irange(1, 59)]): a1 = angle(h, m) # calculate angle at actual arrival time a2 = angle(h, m + nrev(m, 2)) # are angles the same? if a1 == a2: # output solution printf("expected arrival = {h:02d}:{m:02d} [angle = {a:.2f} min]", a=float(a1 * 30))There are two possible answers:
Both of which are illustrated below, with the same shape indicating the identical angles between the hands:
As the party in question is a New Years Eve party, presumably the setter intends us to choose the solution where Madeline was expected to arrive before midnight, but actually arrived after midnight (although this could easily have been specified in the problem text).
Solution: Madeline was due to arrive at 11:43 pm.
LikeLike