$[\underline{\text { Mathematical Logic (Other) }})]$

In the underwater kingdom, octopuses serve with six, seven, or eight legs. Those with 7 legs always lie, while those with 6 or 8 legs always tell the truth. Four octopuses met. The blue one said: "Together we have 28 legs," the green one: "Together we have 27 legs," the yellow one: "Together we have 26 legs," and the red one: "Together we have 25 legs." How many legs does each have?
Since the octopuses contradict each other, there are two cases: either all the octopuses are lying, or exactly one of them is telling the truth.

If all the octopuses are lying, then each of them has 7 legs. So together they have 28 legs. But then the blue octopus would be telling the truth - a contradiction.

If, however, three octopuses lied and one told the truth, then the lying octopuses should each have 7 legs, and the one telling the truth should have either 6 or 8 legs. Therefore, together they would have either 27 or 29 legs, which means the green octopus was telling the truth.

Thus, the green octopus has 6 legs, and the others each have 7 legs.

## Answer

the green octopus has 6 legs, and the others each have 7 legs.