Problem #PRU-116867

Problems Set theory and logic Algorithm Theory Algorithm Theory

Problem

Ladybirds gathered in a sunny clearing. If the ladybird has \(6\) spots, then it always speaks the truth, and if it has \(4\) spots, then it always lies. There are no other types of ladybirds in the meadow. The first ladybird said: “We each have the same number of spots on our backs.” The second one said: “Everyone has \(30\) spots on their backs in total.” “No, we all have \(26\) spots on their backs in total,” the third objected. “Of these three, exactly one told the truth,” – said each of the other ladybirds. How many ladybugs were gathered in the meadow?