### Random Post

### Recent Posts

- Enigma 1065: Cute cubes
- Enigma 444: Rows and rows
- Puzzle 50: Football and addition
- Enigma 1066: Members of the clubs
- Enigma 443: The bells they are a-changing
- Tantalizer 455: Ballistico
- Tantalizer 456: Square deal
- Enigma 1067: Bye!
- Enigma 442b: Oh yes I did! Oh no you didn’t!
- Puzzle 51: A multiplication

### Recent Comments

Brian Gladman on Enigma 1065: Cute cubes | |

Jim Randell on Enigma 1065: Cute cubes | |

geoffrounce on Enigma 444: Rows and rows | |

Jim Randell on Enigma 444: Rows and rows | |

geoffrounce on Enigma 1611: Three sister… |

### Archives

### Categories

- article (11)
- enigma (1,167)
- misc (2)
- project euler (2)
- puzzle (42)
- site news (45)
- tantalizer (45)
- teaser (3)

### Site Stats

- 180,599 hits

Advertisements

This Python code looks for the smallest number of yards that satisfies the given conditions. It runs in 124ms.

Solution:I originally asked for 12 yards of material.12 yards is the smallest number that satisfies the conditions of the puzzle text, but so does 12 + 25

kyards, for integer values ofk≥ 0.So the next smallest solution would be at 37 yards, which perhaps is a but much to count as “a few yards of material” (although I think 12 yards is leaving the realms of “a few” and entering “several yards of material” territory).

I think the following notes show how critical the wording is in this Enigma,

in respect of the statements “nearest inch” and “nearest cm”

In order to understand better the answer to this Enigma, I explored Jim’s

dictionary ‘r’ in more detail.

Dictionary ‘r’ has keys as a tuple in the format (inches,cm) plus values in

inches, expressed as a fraction.

We can get the dictionary print-out and the number of values for each key

by inserting a few lines of code, just before Jim’s exit() statement ie:

If we print out the (key,value) pairs in the dictionary ‘r’, we get:

key (432, 1097) – 35 values

key (432, 1099) – 1 value ie Fraction(43249, 100)

key (432, 1096) – 18 values

key (432, 1098) – 36 values

Fraction(43249, 100) is 432.49 inches and is a unique value in the dictionary

providing the solution to this Enigma.

Also, 432.49 inches is 432.49 * 2.54 = 1098.5246 cm, which is rounded up to

1099 cm, the nearest whole number of centimetres. 432.49 inches is also rounded

down to 432 inches to the nearest whole number of inches, which is

exactly 12 yards.