At a market, a buyer and a seller each have four exotic coins. You are allowed to label each of the eight coins with any positive integer value in cents. The labeling is called $n$-efficient if for any integer $k, 1 \leq k \leq n$, it is possible for the buyer and the seller to give each other some of their coins in such a way that, as a net result, the buyer has paid the seller $k$ cents. Find the greatest positive integer $n$ such that an $n$-efficient labeling of the coins exists.
The answer is 240 .

To see that $n>240$ is impossible, note that there are $2^{8}=256$ ways for the transaction to happen, since each coin either changes hands or does not change hands. However, the $2^{4}=16$ ways in which the buyer keeps all four of his coins clearly cannot allow the buyer to pay the seller a positive amount. Therefore there are at most 240 different amounts which the buyer can pay the seller.

To make these amounts the consecutive integers $1,2,3, \ldots, 240$, we assign values as follows:

Buyer: $16,32,64,128$

Seller: $1,2,4,8$.

Then the buyer can give the seller any multiple $16 x$ of 16 cents up to 240 by writing $x$ in binary as a sum of distinct powers of 2 , and the seller can correspondingly give the buyer any amount from 0 to 15 cents in change.