Sunday Times Teaser 2940 – Getting There in the End
by Danny Roth
Published January 27 2019 (link)
A tractor is ploughing a furrow in a straight line. It starts from rest and accelerates at a constant rate, taking a two-digit number of minutes to reach its maximum speed of a two-digit number of metres per minute. It has, so far, covered a three-digit number of metres. It now maintains that maximum speed for a further single-digit number of minutes and covers a further two-digit number of metres. It then decelerates to rest at the same rate as the acceleration. I have thus far mentioned ten digits and all of them are different.
What is the total distance covered?
One Comment
Leave one →
-
Brian Gladman permalink123456789101112131415161718192021222324252627282930# the two digit time for the acceleration phasefor t1 in range(10, 100):s8 = set('0123456789').difference(str(t1))if len(s8) != 8:continue# the two digit final velocity after the acceleration phasefor v in range(10, 100):s6 = s8.difference(str(v))if len(s6) != 6:continue# the three digit distance travelled during the acceleration phasex1 = (v * t1) // 2s3 = s6.difference(str(x1))if not (v * t1 == 2 * x1 and 100 < x1 < 1000 and len(s3) == 3):continue# the single digit time spent at the constant maximum speedfor t2 in (int(x) for x in s3):# the two digit distance travelled at the constant maximum speedx2 = v * t2if not (10 <= x2 < 100 and s3 == set(str(t2) + str(x2))):continue# the total distance travelledd = 2 * x1 + x2print(f"{d} metres (v = {v}, t1 = {t1}, x1 = {x1}, t2 = {t2}, x2 = {x2})")