479. Matchstick Puzzle. Taking a box of matches, I found that I could form any pair of regular polygons shown in our diagram using all the matches each time. So, if I had 11 matches, I could use them to form, as shown, either a triangle and a pentagon, or a pentagon and a hexagon, or a square and a triangle (using only 3 matches for the triangle); but with 11 matches, I could not form either a triangle and a hexagon, or a square and a pentagon, or a square and a hexagon. Of course, each side of the figure must use the same number of matches.

What is the smallest number of matches that could be in my box?
479. The smallest possible number is 36 matches. We can form a triangle and a square from 12 and 24 matches, a triangle and a pentagon from 6 and 30 matches, a triangle and a hexagon from 6 and 30 matches, a square and a pentagon from 16 and 20 matches, a square and a hexagon from 12 and 24 matches, and a pentagon and a hexagon from 30 and 6 matches. These pairs of numbers can be varied in all cases except the fourth and the last. The total number of matches cannot be less than 36. For a triangle and a hexagon, the number of matches must be divisible by 3; for a square and a hexagon, an even number of matches is required. Therefore, the desired number must be among the numbers divisible by 6, such as \(12,18,24,30,36\), but fewer than 36 matches cannot form a pentagon and a hexagon.