## Teaser 2914: Bank statement

**From The Sunday Times, 29th July 2018** [link]

My last bank statement was most interesting. The first line showed the opening balance in pounds and pence, then each of the following four lines showed a debit together with the resulting balance. I did not go overdrawn.

Remarkably, each of the five balances used the same five different digits once only, and the largest of the digits was less than three times the smallest. Each of the four debits also used five different digits once only, but the digits in the debits were all different from those in the balances.

What was the final balance?

[teaser2914]

## Jim Randell 11:23 am

on8 May 2019 Permalink |This Python 3 program runs in 415ms.

Run:[ @repl.it ]Solution:The final balance was £ 347.58.There are two possibilities for the initial amount and the first debit amount, which give the same value for the balance:

After that the next three debits are:

The condition that “the largest of the digits was less than three times the smallest” reduces the search space, but there are no further solutions without this condition.

LikeLike

## GeoffR 10:28 am

on9 May 2019 Permalink |A brute force approach in MiniZinc uses 45 integer variables and sets to solve this teaser.

LikeLike