Skip to content

Sunday Times Teaser 2962 – Book Receipts

by Howard Williams

Published June 30 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?

6 Comments Leave one →
  1. Brian Gladman permalink

    Using my AlphaSum alphametic solver:

    Here is an alternative version that is faster (30ms) than that above (43ms).

  2. Erling Torkildsen permalink

    As no specific currency is given, my answer is not adjusted in any way. (In my local bookshop the prices are in NOK and my answer is about the price of a rather expensive book in that currency.)

  3. SandyR permalink

    Sorry, have just started programming and working on a tablet so don’t know how to paste formatted code. Apologies if inelegant.

    • Brian Gladman permalink

      Welcome to the site SanyR! The menu item ‘About’ gives information on how you can post formatted code.

      • SandyR permalink

        Thanks Brian, I will check that. Your site has been really useful for me as it helps me put my learning into practice and I can get tips from the answers posted.

  4. Erling Torkildsen permalink

    After a piece of advice from Brian an improved version of my first upload turns out like below. As this site obviously works as a workshop for learners of Python (like myself), I let my first upload stand.

Leave a comment to Brian Gladman Cancel reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS