Five sisters, named Mária, Malvin, Margit, Márta, and Magda, exchanged gifts at Christmas. Each girl spent 140 forints on gifts for the other four sisters, and each received four gifts totaling 140 forints. The price of each gift, expressed in forints, was a whole number divisible by 10. Each of the five girls distributed the 140 forints differently, but in such a way that each of the four gifts they bought was of a different value.

The most expensive gift was bought by Mária for Márta. The next most expensive gift was bought by Malvin for Magda. Margit spent the most on Mária and the least on Márta. Malvin received gifts of equal value from all her sisters except Margit. Margit received a more expensive gift from Magda than from any other sister. How much did Magda spend on Mária?
A 140 forints can only be divided into four addends in five ways that meet the conditions of the problem, so the five girls divided their money as follows (regardless of the order of the girls):

| 80 | 30 | 20 | 10 |
| :--- | :--- | :--- | :--- |
| 70 | 40 | 20 | 10 |
| 60 | 50 | 20 | 10 |
| 60 | 40 | 30 | 10 |
| 50 | 40 | 30 | 20 |

Let's create a table and record our findings in the appropriate fields of the table, referring to the point on which the entry is based.

|  Giver | Mária | Malvin | Margit | Márta | Magda |
| :---: | :---: | :---: | :---: | :---: | :---: |
| Mária | - | c) 30 | h) 20 | a) 80 | h) 10 |
| Malvin | l) 20 | - | $m)$ 10  $n)$ 40 | $m)$ 40  $n)$ 10 | b) 70 |
| Margit | d) 60 | c) 50 | - | e) 10 | f) 20 |
| Márta | ![](https://cdn.mathpix.com/cropped/2024_05_02_61e3e3751955c9c2f8cfg-1.jpg?height=92&width=120&top_left_y=1069&top_left_x=937) | c) 30 | $m)$ 50  $n)$ 20 | - | h) 40 |
| Magda | $m)$ 40  $n)$ 10 | c) 30 | g) 60 | $m)$ 10  $n)$ 40 | - |

a) The most expensive - 80 forints - gift was bought by Mária for Márta, and thus Mária bought gifts according to the first distribution.

b) In value, the next is Malvin's 70 forints gift to Magda, and thus Malvin gave gifts according to the second distribution.

c) The three equally valued gifts that Malvin received could only be 30 forints, because Mária did not give a 40 forints gift according to the first distribution, and Margit's gift could not exceed 60 forints. Therefore, Margit bought a $140-3 \cdot 30=50$ forints gift for Malvin.

d) Since Margit bought the most expensive gift for Mária, this could only be 60 forints, and Margit distributed her gifts according to the third distribution.

e) Margit bought the cheapest gift, 10 forints, for Márta.

f) It follows from the distribution that Margit bought a 20 forints gift for Magda.

g) Margit received a more expensive gift from Magda than from any of her other sisters, so it must be 60 forints, because the 70 and 80 forints gifts already have owners, and 50 forints or less contradicts the possible distributions.

h) Magda could only receive a 10 or 20 forints gift from Mária. If she received a 20 forints gift, then she could only receive a 30 forints gift from Márta, but Márta already gave a 30 forints gift to Malvin, so Magda received a 10 forints gift from Mária, and consequently a 40 forints gift from Márta, and a 20 forints gift from Margit.

i) It is clear from the table that Magda could only have spent her money according to the fourth distribution, and Márta only according to the fifth distribution.

j) Based on point i), Magda could only give a 40 or 10 forints gift to Mária.

k) Márta received a total of 50 forints worth of gifts from Malvin and Magda. She could not have received this in a 20+30 distribution, because the 30 forints gifts already have owners. Therefore, Márta received (or vice versa) a $40+10$ distribution from Malvin and Magda.

l) Márta bought 70 forints worth of gifts for Mária and Margit, and this - according to i) - could only be in a $50+20$ value. So Mária received either a $20+40$ or a $50+10$ distribution from Márta, and thus definitely a $140-2 \cdot 60=20$ forints gift from Malvin.

m) Suppose Márta bought a 20 forints gift for Mária, then the 50 forints gift went to Margit, consequently Margit received a 10 forints gift from Malvin, a 40 forints gift from Márta, a 10 forints gift from Magda, and Mária received a 40 forints gift.

n) If, however, Márta bought a 50 forints gift for Mária, then the 20 forints gift went to Margit, consequently Margit received a 40 forints gift from Malvin, a 10 forints gift from Márta, a 40 forints gift from Magda, and finally a 10 forints gift from Magda to Mária.

The $m$) and $n$) variations are not contradictory, both are possible. According to this, our problem has 2 solutions: Magda spent either 40 or 10 forints on Mária.

Note: The problem can be made unambiguous if we add to the conditions, for example: "Márta received a more expensive gift from Malvin than from Magda." In this case, only the $m$) variation is valid.

Meskó Attila (Bp. VII., Madách g. III. o. t.)