Sunday Times Teaser 3041 – The Best Game Played In 1966
by Stephen Hogg
Published Sunday January 03 2021 (link)
For Christmas 1966 I got 200 Montini building blocks; a World Cup Subbuteo set; and a Johnny Seven multi-gun. I built a battleship on the “Wembley pitch” using every block, then launched seven missiles at it from the gun. The best game ever!
Each missile blasted a different prime number of blocks off the “pitch” (fewer than remained). After each shot, in order, the number of blocks left on the “pitch” was: a prime; a square; a cube; a square greater than 1 times a prime; a cube greater than 1 times a prime; none of the aforementioned; and a prime.
The above would still be valid if the numbers blasted off by the sixth and seventh shots were swapped.
How many blocks remained on the “pitch” after the seventh shot?
This is a distilled version of the code in my previous post. Most of the comment lines from that code are applicable. The initialisation of the lists of shots has evolved such that there is a zeroeth shot that blasts away zero blocks. The logic of the remainder of the program is unchanged except that 4 line of code have been condensed into a single list comprehension.
I took a different approach, simulating the actual game, firing each missile in sequence and then calculating the blocks left. I use (M1..M7) for the missiles and (B1..B7) for the blocks left after each missile was fired.