### 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

I assumed that the multipliers in each case were integers.

This Python program runs in 38ms.

Solution:There are 7 furlongs to the mile.There are 2 inches in a foot. 1 foot = 2 inches.

There are 3 feet in a yard. 1 yard = 6 inches.

There are 5 yards in a furlong. 1 furlong = 30 inches.

There are 7 furlongs in a mile. 1 mile = 210 inches.

1 mile + 1 furlong + 1 yard + 1 foot + 1 inch = (210 + 30 + 6 + 2 + 1) inches = 249 inches.

Without the restriction that

Mis prime there is an additional solution off=2,y=3,F=4,M=9.I’ve also made a Python library that runs a

MiniZincmodel and parses the output, which means you can do any additional post-processing and output using Python.This Python program uses a MiniZinc model to generate candidate solutions, then the Python code checks that

Mis prime, and produces the output.Overall run-time for this program is 116ms.

The code for

minizinc.pyis available on GitHub.