## Teaser 2962: Book receipts

**From The Sunday Times, 30th June 2019** [link]

My wife recently purchased two books from her local bookshop. She showed me the receipt, which showed the cost of each book and the three-figure total cost. I noticed that all of the digits from 1 to 9 had been printed. Coincidentally, exactly the same happened to me when buying two different books, but my more expensive book cost more than hers. In fact, it would not have been possible for that book to have cost more.

How much did I pay for the more expensive book?

[teaser2962]

## Jim Randell 5:57 pm

on28 June 2019 Permalink |Assuming each digit from 1 to 9 is used exactly once, we can consider the following alphametic sum:

Which gives the prices of the books, and the total in whatever currency units we are using.

This Python program uses a couple of useful routines from the

enigma.pylibrary to solve the puzzle.It runs in 163ms.

Run:[ @repl.it ]Solution:The more expensive book cost 784 currency units.There are 168 possible sums, and the largest possible summand is 784, making the sum:

If the digit 0 is allowed (but we are still looking for 9 different digits) then there are 544 possible sums, and the largest possible summand is 847, in the sum:

LikeLike

## GeoffR 12:11 pm

on3 March 2020 Permalink |I also found that the summands 546 and 654 both had six solutions to the alphametic equation.

LikeLike