### 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 program runs in 37ms.

Solution:The result of the first multiplication sum is 35109. The result of the second multiplication sum is 45696.The complete multiplication sums are shown below:

JAN = 341 (11×31), MAR = 248 (8×31), YEAR = 9048 (754×12, 174×52).

It is possible to use the generalised alphametic solver (

SubstitutedExpression()) from theenigma.pylibrary to solve this one. And it can be called directly from the command line without having to write a program.We could introduce 28 additional symbols for the asterisks (using the

--symbols="<string>"parameter) and then use the--distinct="<string>"parameter to limit the letters actually given in the diagram to be distinct, while the the remaining additional symbols can take on any value. This would allow us to read off the values for the complete sums from the solution.But as we don’t care about most of their values here I have just used additional symbols (lower case letters) for the multiplicands of the sums, and then I have used expressions to ensure that the intermediate multiplications in the sums are the correct “shape”.

Finally the

--answer="<expr>"parameter is used to display the results of the sums.The command runs in 178ms.