## Teaser 2803: Easy as ABC

**From The Sunday Times, 12th June 2016** [link]

George and Martha have replaced the digits 0 to 9 by the letters

AtoJin some order. George then noted a neat product, namely:

AB × CDE = FGHIJThen Martha noted a neat sum, namely:

AB + CD + EF + GH + IJ = CCCWhat, in order, are the values of the letters

AtoJ?

[teaser2803]

## Jim Randell 9:34 am

on12 July 2019 Permalink |When this puzzle was published (June 2016) I wrote a couple of programs to solve it using the [[

`SubstitutedSum()`

]] solver from theenigma.py(which itself was originally written to solveEnigma 63and similar puzzles).However, shortly afterwards I started work on a solver for general alphametic expressions in Python, and this puzzle was one of the examples I used to test it. I wrote up my thoughts as

Solving Alphametics with PythonandSolving Alphametics with Python, Part 2. And although there have been many incremental improvements to the code over the last 3 years, the ideas fromPart 2still form the basis of the [[`SubstitutedExpression()`

]] solver in theenigma.pylibrary, which I have used it to solve a wide variety of alphametic puzzles in that time.For this puzzle we can use the following command line (which executes in 160ms):

Run:[ @repl.it ]Solution:The values of the letters are: A=5 B=2 C=3 D=6 E=7 F=1 G=9 H=0 I=8 J=4.LikeLike

## GeoffR 11:18 am

on12 July 2019 Permalink |LikeLike