A beginning songwriter always sold CDs with his music after performances. On Thursday, he sold eight identical CDs. The next day, he also offered his new CD, so people could buy the same as on Thursday or the new one. On Saturday, all the listeners wanted the new CD, and the songwriter sold six of them that day. He earned 590 Kč, 720 Kč, and 840 Kč on individual days, but we will not reveal which amount belongs to which day.

- How much did the older CD cost?
- How many new CDs did he sell on Friday?

(L. Šimünek)
First, we will try to assign the individual amounts to the days. The Thursday revenue must be a multiple of eight, and the Saturday revenue must be a multiple of six. The numbers 720 and 840 are both multiples of six and eight. The number 590 is not a multiple of six or eight. Therefore, the singer must have earned a) 720 Kč on Thursday and 840 Kč on Saturday, or b) the opposite. On Friday, he definitely earned 590 Kč. Let's check both options.

a) The price of an old CD would be $720 \div 8 = 90$ (Kč) and the price of a new CD would be $840 \div 6 = 140$ (Kč). We will verify whether the two prices can add up to 590 Kč on Friday. Consider different quantities of new CDs, subtract their total cost from 590 Kč each time, and check if the resulting difference is divisible by 90.

| for new CDs | 0 | $1 \cdot 140$ | $2 \cdot 140$ | $3 \cdot 140$ | $4 \cdot 140$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| for old CDs | 590 | 450 | 310 | 170 | 30 |

The table shows that the amount of 590 Kč can be composed from the prices of 90 Kč and 140 Kč, and this can be done in only one way: $1 \cdot 140 + 5 \cdot 90$.

b) The price of an old CD would be $840 \div 8 = 105$ (Kč) and the price of a new CD would be $720 \div 6 = 120$ (Kč). Similarly to the previous case, we will verify whether the two prices can add up to 590 Kč on Friday. (The table will be simpler if we consider in advance that the Friday revenue from old CDs must end in zero, so that the revenue from new CDs also ends in zero.)

| for old CDs | 0 | $2 \cdot 105$ | $4 \cdot 105$ |
| :---: | :---: | :---: | :---: |
| for new CDs | 590 | 380 | 170 |

The table shows that the amount of 590 Kč cannot be composed from the prices of 105 Kč and 120 Kč.

The problem has only one solution: the old CDs cost 90 Kč, and on Friday, the singer sold one new CD.