Problem 4. If an octopus has an even number of legs, it always tells the truth. If it has an odd number, it always lies. One day, a green octopus said to a dark blue one:

- I have 8 legs. And you only have 6.
- I have 8 legs, - the dark blue one was offended. - And you only have 7.

- The dark blue one really has 8 legs, - supported the purple one and boasted: - And I have 9!

- None of you have 8 legs, - the striped octopus joined the conversation. - Only I have 8 legs!

Who among the octopuses had exactly 8 legs?

[7 points] (I.V. Raskina)
Answer: The striped octopus has 8 legs.

Solution: If the purple octopus is telling the truth, then it has an even number of legs. But in this case, it cannot say that it has 9 legs. Therefore, the purple octopus is lying. So, the dark blue octopus does not have 8 legs. But the dark blue octopus says that it has 8 legs, which means it is lying. Therefore, it has an odd number of legs. By saying that the dark blue octopus has 6 legs, the green one lied. Therefore, it lied the first time as well, and it does not have 8 legs. Thus, the first statement of the striped octopus is true. So, the second statement is also true, and it indeed has 8 legs. And the other octopuses have an odd number of legs.