Brain-Teaser 26: Farmer’s overdraft
From The Sunday Times, 17th September 1961 [link]
Farmer Green was in the red. On studying his statement (which was entirely in complete £s) he found that the aggregate of the figures in his deposits total was only one-fourth of the aggregate of the figures in his withdrawals total. He also noted that, coincidentally, the latter aggregate equals the balance, in red, that would be shown when he has paid in the £749 cheque which he, fortunately, had received that morning.
What was the overdraft shown on the statement?
[teaser26]
Jim Randell 10:35 am on 14 March 2021 Permalink |
This Python program run in 89ms.
Run: [ @replit ]
from collections import defaultdict from enigma import irange, dsum, div, printf # record number by digit sum ns = defaultdict(list) # consider increasing numbers for n in irange(1, 10000): ds = dsum(n) ns[ds].append(n) # if n is the total amount withdrawn # then the total amount deposited is less than this # and has a digit sum that is ds/4 dds = div(ds, 4) if dds is None: continue for t in ns[dds]: # balance (is in red, so is negative), after the cheque is paid in red = -(t - n + 749) # is the same as the digit sum of the withdrawals if red == ds: # output solution od = ds + 749 printf("withdrawn = {n}, deposited = {t}, red = {red}; overdraft = {od}")Solution: The overdraft on the statement is £777.
There are 27 different (widthrawn, deposited) totals, but they all lead to an overdraft on the statement of £777.
LikeLike
Hugh Casement 1:52 pm on 14 March 2021 Permalink |
I don’t follow this one. We are not told the opening balance on the bank statement, so we can’t tell what the difference between deposits and withdrawals should be.
And one needs to be a mind-reader to deduce that “aggregate of the figures” means sum of the digits! Why can’t the setters of puzzles say what they mean?
LikeLike
John Crabtree 7:43 pm on 15 March 2021 Permalink |
The overdraft on the statement = W – D = Sum(W) + 749
And so Sum(D) = – 2 mod 9 = 7 and Sum(W) = 4 * 7 = 28
The overdraft on the statement = 28 + 749 = £777
LikeLike