Snow White and the Seven Dwarfs collected cones for a campfire. Snow White said that the total number of cones is divisible by two. The first dwarf stated that it is a number divisible by three, the second dwarf said it is a number divisible by four, the third dwarf said it is a number divisible by five, the fourth dwarf said it is a number divisible by six, the fifth dwarf said it is a number divisible by seven, the sixth dwarf said it is a number divisible by eight, the seventh dwarf said it is a number divisible by nine. Two of the eight collectors, who spoke about the number of cones immediately after each other, were wrong, the others were right.

How many cones were there in the pile, if there were certainly fewer than 350?

(L. Hozová)

Hint. Which numbers are divisible by four and yet not divisible by two?
The number of cones is a number less than 350, which is not divisible by exactly one pair of consecutive numbers from 2, 3, 4, 5, 6, 7, 8, 9, and by all others yes. None of the pairs $(2,3)$, $(3,4)$, $(4,5)$, $(5,6)$, and $(6,7)$ can be it, because there would always be some other number among the remaining ones by which the number of cones could not be divisible:

- Indivisibility by 2 forces indivisibility by 4, 6, and 8,
- Indivisibility by 3 forces indivisibility by 6 and 9,
- Indivisibility by 4 forces indivisibility by 8,
- Indivisibility by 6 forces indivisibility by 2 or 3.

The number of cones is not divisible either by the pair of numbers $(7,8)$ or $(8,9)$, and by all other numbers yes. This number must then also be divisible by the least common multiple of the other numbers:

- In the first case, the least common multiple of the numbers $2,3,4,5,6,9$ is $4 \cdot 5 \cdot 9=180$. The only multiple of 180 less than 350 is precisely 180.
- In the second case, the least common multiple of the numbers $2,3,4,5,6,7$ is $3 \cdot 4 \cdot 5 \cdot 7=420$, which is more than 350.

Snow White and the dwarfs collected 180 cones.