Problem

Source: 2020 Caucasus Mathematical Olympiad

Tags: combinatorics



By one magic nut, Wicked Witch can either turn a flea into a beetle or a spider into a bug; while by one magic acorn, she can either turn a flea into a spider or a beetle into a bug. In the evening Wicked Witch had spent 20 magic nuts and 23 magic acorns. By these actions, the number of beetles increased by 5. Determine what was the change in the number of spiders. (Find all possible answers and prove that the other answers are impossible.)