# 99p Shop

Here is a problem from “SYMmetry Plus+” which is the magazine produced by the Mathematical Association for young mathematicians. This is from the Summer 2005 edition (#27).

The supermarket Tesbury’s prices all its items at so many pounds and 99 pence. If the total bill comes to £35.84 is it possible to say how many items have been bought? What if the total were £135.84 or £47.12?

To be clear, this means that every item is either 99p, £1.99, £2.99, etc. It’s a very simple to solve problem, but it is kind of still interesting I suppose. So let us consider the problem in general. Let us say the cost price overall pill is P pounds and p pence (i.e. $100P + p$ pence and $0 \le p < 100$). That we have:

$100P + p = \sum_{i=1}^N (100a_i + 99)$

For some integers $a_i$. Reducing mod 100 we have that:

$p = \sum_{i=1}^N 99 = 99N \pmod{100}$

Of course, the inverse of 99 is again 99 (as it equals -1) and so we have that $99p = N \pmod{100}$. It hence the follows that:

$N = 99p + 100k$

(where p is the number of pence spent (ignoring the pounds), N is the number of items bought and k is some integer.)

Take the original example, where p = 84. Then $N = 8316 + 100k$. By choice of k, this is equal to $N = 16 + 100k'$. It follows that $k' = 0$ as if there were 116 items the cost would be at least 99×116 = £114.84. Given that it is less than this at £35.84, we be sure that there are only 16 items. This also answers the second part – you cannot tell, there could be 16 or 116 items in your basket.

As for the final part, that means there is $N = 88+ 100k$ items. However, if there 88 items that must cost at least £87.12, and so there is no way that this total could be achieved.