Enigmatic Code

Programming Enigma Puzzles

Category Archives: puzzle#

Puzzle #22: The 9-minute egg

From New Scientist #3248, 21st September 2019 [link] [link]

I like my eggs to be boiled for exactly 9 minutes. The problem is that I have no way to measure time except for two egg timers that are able to measure precisely 4 and 7 minutes respectively.

There is more than one way to set up the timers to measure exactly 9 minutes, but I am keen to eat my egg as soon as possible. Can you help?


Puzzle #21: Six weeks of seconds

From New Scientist #3247, 14th September 2019 [link]

Which number is bigger:

The product of all the whole numbers from 1 to 10 inclusively, sometimes written as 10 factorial or 10!


The number of seconds in six weeks?

Can you work it out without resorting to a calculator?


Puzzle #20: Caesar cipher

From New Scientist #3246, 7th September 2019 [link] [link]

How might Caesar get you from 3 to 47?

A bit of general knowledge might help you here, or some numerology, because there are two neat solutions to this puzzle.


Puzzle #19: The vicar’s age

From New Scientist #3245, 31st August 2019 [link] [link]

A bishop visited his friend the vicar on her birthday. Knowing the bishop liked number puzzles, the vicar told him about a family that had just joined her church.

“If you multiply their three ages together, you get 2450, and if you add their ages together, you get your own age, your grace.”

The bishop, after some thought, said: “I can’t be certain how old everyone in the family is.”

The vicar responded: “I am older than everyone in that family.”

The bishop could then tell how old everyone was.

How old was the vicar on that day?


Puzzle #18: Cable on the moon

From New Scientist #3244, 24th August 2019 [link]

It is the year 2100, and the Moon Colonisation Programme is well-advanced.

A power cable is being laid all the way around the moon’s equator. The original plan was to put the cable on the moon’s surface, but it has been suggested that instead it should be buried in a trench that is 1-metre deep. This will make it safer and will also save on the amount of cable needed.

How much shorter will the cable be if it is buried in this way?


Puzzle #17: Which flipping year?

From New Scientist #3243, 17th August 2019 [link]

2019 is an example of a year that can be “flipped”. This means that on an old-style calculator display, it still forms a four-digit number when spun both horizontally and vertically:

The difference between a flippable year and its flipped version is called the flipping difference, and for 2019 the flipping difference is 6102 – 2019 = 4083.

Since the Romans conquered Britain in AD 43, which year has had the biggest flipping difference?


Puzzle #16: Clever code

From New Scientist #3242, 10th August 2019 [link] [link]

Rashmi told us that she had to make up some codes, ones that preferably have a unique quality to them.

“For a four-digit code, I chose 2020, because it has two 0s, zero 1s, two 2s and zero 3s. I chose 3211000 for a seven-digit code.”

She then told us that she used the same idea for a 10-digit code.

What was this code?


Puzzle #15: Lines through the chessboard

From New Scientist #3241, 3rd August 2019 [link] [link]

Linus is using a thin felt-tip pen and a ruler to draw straight lines on a conventional 8×8 chessboard. With eight lines, he can easily ensure that a line passes through every square on the board. For instance, he can just draw a line through the middle of each row of squares, which means each line would go through eight squares. But a line can pass through more than eight squares – for example, the one in the illustration goes through nine – so Linus wants to find a way to cut through all 64 squares with fewer than eight lines.

Can you help?


Puzzle #14: The H coins problem

From New Scientist #3241, 27th July 2019 [link] [link]

Seven coins have been placed in the “H” shape above. Altogether there are five lines of three, including the diagonals.

Your challenge is to place two more coins so that you can make 10 straight lines of three. No stacking of coins or other sneaky trick is required.

If you find a way to do this, give yourself a silver medal. If you find a second way to do it that isn’t a mirror image of the first, award yourself a gold.


Puzzle #13: Snail party

From New Scientist #3240, 20th July 2019 [link] [link]

Sam has four pet snails. She puts one of them at each corner of a square ABCD with sides 2 metres long. Being very friendly, each snail moves towards its neighbour, snail A to snail B, B to C, and so on, at all times pointing directly towards that neighbour. If each snail moves at a constant speed of 2 metres per hour, how long will it be before they meet?


Puzzle #11, #12: Lunar years, Hole of the moon

From New Scientist #3238, 13th July 2019 [link] [link]

Lunar years

My twin sister went to live on the moon on our 30th birthday. From then on, she counted a year as 365 sunrises, just as we do on Earth. I am now 60. Which birthday did she last celebrate?


Hole of the moon

I punched a hole 6 millimetres across in a piece of paper and held it at arm’s length to look at the full moon. I was pleased to find that the moon filled the hole perfectly. If the moon is 3500 kilometres across, can you estimate how far away it is?


[puzzle#11] [puzzle#12]

Puzzle #10: Betty’s change

From New Scientist #3237, 6th July 2019 [link] [link]

Betty works at a cash register in the US. When you purchase something from her, Betty always gives you your change the sensible way: by selecting the largest coins that don’t take her over the amount that she owes you. For example, if she owed you 37 cents, she would first pick out a quarter (25 cents), then a dime (10 cents) then two pennies (a cent each).

However, this morning she has run out of nickels (5 cents) to give out as change, though she has plenty of pennies, dimes and quarters. When she gives you your change, you notice that she has given you twice as many coins as she could have done if she hadn’t been so keen to always start with the largest coin. What is the smallest possible monetary value of the change she has given you?


Puzzle #09: The cake and the candles

From New Scientist #3236, 29th June 2019 [link] [link]

Lady Frederica von Battenberg has baked a long, thin rectangular cake for her daughter Victoria. She has picked two random points on top of the cake on which she has placed two candles.

She hands the cake knife to Victoria, who now proceeds to pick a random point along the length of the cake, and cuts across the cake at that point.

Now that the cake has been cut in two, what is the chance that both pieces of cake have a candle on them?


Puzzle #08: Prisoners locked up

From New Scientist #3235, 22nd June 2019 [link] [link]

There are 40 prisoners in Hallaway women’s prison, each in their own numbered cell, and 40 prison officers. All the cell doors are open and it is time to lock up for the night. Unfortunately, the prison officers have been drinking. Near the cells, there is a bucket containing the numbers 1 to 40 on pieces of paper.

Each prison officer in turn does the following: Picks a number from the bucket (and doesn’t put it back); turns the key in the cell of the number on her paper and of all cells that are multiples of that number; then goes to bed.

Turning the key makes a locked cell unlocked and an unlocked cell locked.

The first officer picks number 12, so turns the key (and locks) cells 12, 24 and 36. The next picks 8, and turns the key in 8, 12, 16, 24 (again), 32 and 40. The other officers follow in turn, each with a different number. After all 40 officers have done the rounds, the prison director, knowing her staff were drunk, now visits each cell and turns the key.

Which prisoners were able to escape?


Puzzle #07: Amveriric’s boat

From New Scientist #3234, 15th June 2019 [link] [link]


The billionaire Mr Amveriric keeps a yacht in a private dock in the Mediterranean. It is tethered to the quay by a rope.

Last time his staff tied up the boat, they left too much slack in the rope, so the boat is now 1 metre away from the quay when the rope is taut. Hearing that a storm is on the way, Amveriric realises that the boat might get smashed against the wall by the buffeting wind, so he sends his henchman, Benolin Chestikov, to shorten the rope.

Seeing that the boat is 1 metre from the wall, Benolin decides he will pull the rope horizontally by 1 metre, and as he pulls the boat moves in horizontally.

Will the boat reach the wall or not? (And can you prove to yourself without resorting to trigonometry?)


Puzzle #06: Darts challenge

From New Scientist #3233, 8th June 2019 [link] [link]

Everyone knows that on a regular dartboard you can score 180 with three darts, by getting three treble twenties. However, there are scores below 180 that you can’t get with three darts.

What is the lowest score you can’t get with three darts? And for that matter, what is the lowest score that you can’t get with two darts? And with one dart? (You can of course score zero with a dart, simply by missing the board).


Puzzle #05: Murphy’s law of socks

From New Scientist #3232, 1st June 2019 [link] [link]

I am convinced that my washing machine eats socks. Every time I wash a load, another sock disappears. Last week I ran out of socks, so I bought myself three new pairs.

What is the chance that, after my first three washes, I will be left with three odd socks? Indeed, what is the chance that I will have even one pair intact?


Puzzle #04: Which door?

From New Scientist #3231, 25th May 2019 [link] [link]

You may have heard of the US game show “Let’s Make a Deal”, in which the star prize is hidden behind one of three doors and the contestant has to pick the lucky door.

Now there is a new game show, “Let’s Make a Bigger Deal”, hosted by Jayne Brody. There are five doors, A, B, C, D and E, and contestant Nico is allowed to choose three. If the prize is behind one of them, he wins. Nico picks doors A, B and D.

As always happens on the show, to build drama, Brody opens three doors (two of them Nico’s) that she knows don’t have the prize behind them: A, D and E. Two remain closed: Nico’s (B) and C. Brody says: “Nico, do you want to stick with B, or switch to C? You can phone a friend if you want”.

Nico likes this idea and rings his friend Leah: “Hi Leah, there are two doors left. Should I choose door B or door C?”.

Which should Leah suggest? And should Nico follow Leah’s advice?


Puzzle #03: Cube shadow

From New Scientist #3230, 18th May 2019 [link]

At midday at her home in Ecuador, Natalia holds a solid cube 1 metre above the ground and it casts a shadow. She rotates the cube a bit and finds that the smallest shadow she can create is a square. What is the shape of the largest shadow she can produce with the cube at noon and how much bigger is it than the square shadow?


Puzzle #02: Getting past the freight train

From New Scientist #3229, 11th May 2019 [link] [link]

A very long passenger train is heading along a single track railway behind a freight train composed of a locomotive and three freight trucks. They are approaching a station where the freight train is due to unload. To keep to its timetable, the passenger train needs to leave before the freight train will have had time to unload.

At the station, there is a siding that either train could drive into. The siding is large enough to hold a locomotive and one freight truck, or two freight trucks. Both trains have couplings at the front that allow them to push and pull trucks. How can the passenger train get past the freight train so that both can continue on their journey?


%d bloggers like this: