13. Alberto and Barbara have two bags, which contain 2022 and $9^{99}$ candies, respectively. At any time, one of them can eat a candy from their own bag (without having to respect turns or alternation rules), on the condition that, in this case, they must give another candy to the other person, who puts it in their own bag. After some time, neither of them can eat any more candies. It can be stated that, at this point, ..

(A) both are left without candies

(B) Alberto has one candy, Barbara none

(C) Barbara has one candy, Alberto none

(D) both have one candy

(E) one of them (it cannot be predicted which) has one candy, the other none
Problem 13. The correct answer is (D).

Every time one of the two eats a candy, the difference in the number of candies in the two bags changes by 3 units. Since at the beginning both have a number of candies that is a multiple of 3, the initial difference is also a multiple of 3 and will remain so throughout the process, regardless of the sequence of actions. It is clear that, in the final situation, neither can have more than 1 candy (if someone had at least two, they could eat one and give another to their friend). Since the difference must be divisible by 3, the only possibilities are that, in the end, they have 1 or none each. However, the latter situation is unachievable: indeed, after any legal move, the one who did not eat the candy receives one and therefore cannot end up with an empty bag. It follows that in the final situation, they must both have one candy.