# Task 5. Maximum 15 points

In the treasury of the Magic Kingdom, they would like to replace all old banknotes with new ones. There are a total of 3,628,800 old banknotes in the treasury. Unfortunately, the machine that prints new banknotes requires major repairs and each day it can produce fewer banknotes: on the first day, it can only produce half of the banknotes that need to be replaced; on the second day, only a third of the remaining old banknotes in the treasury; on the third day, only a quarter, and so on. Each run of the machine in any state costs the treasury 90,000 monetary units (m.u.), and major repairs will cost 700,000 m.u. After major repairs, the machine can produce no more than one million banknotes per day. The kingdom has allocated no more than 1 million m.u. for the renewal of banknotes in the treasury.

(a) After how many days will 90% of the old banknotes be replaced?

(b) Will the kingdom be able to replace all the old banknotes in the treasury?
# Solution:

(a) If a major repair is to be carried out, it is most effective to do so on the second day, as this will allow the production of new banknotes to increase from 604,800 to 1 million on that day, and the production will remain at 1 million in subsequent days, which is higher than the capacity without major repairs. Conducting the major repair on the first day is not efficient, as the production without it is 1,814,400 banknotes. (9 points).

With the major repair, the budget will cover the repair itself and 3 launches of the machine, thus the maximum number of banknotes that can be replaced is 1,814,400 + 1,000,000 + 1,000,000 = 3,814,400 banknotes, which exceeds 90% of the old banknotes (2 points).

Let's consider the scenario where the machine is not repaired. We have enough funds for only 11 launches. In percentage terms, the remaining amount is:

After the first day: 50%.

After the second day: 200/3.

After the third day: 25%.

After the fourth day: 20%. And so on.

After the ninth day: 10%.

This means it will take 9 days (after eight days, 3,265,920 banknotes will be replaced), which constitutes 90% of the banknotes. This option allows saving the budget but requires more time. (2 points)

(b) If we do not carry out the major repair, after 11 launches, we will only be able to replace 3,298,909 banknotes, meaning we cannot, without repairing the machine, re-mint all the banknotes. However, we have already shown that with the major repair, all old banknotes can be replaced (2 points)