Who stole my walnuts?

Logic Level 3

Once upon a time, there were 5 5 squirrels, named A , B , C , D , E A, B, C, D, E , living together in the tree hole. One day, after a long search, the squirrel family collected a total of 10 10 walnuts. The big squirrel A A declared to divide 10 10 walnuts equally among the five before going to the kitchen to get the honey.

When squirrel A A came back, however, he found out that all the walnuts were gone and soon realized that the other four were chewing the food rapidly. The big squirrel A A became so angry that he interrogated each squirrel to seek for the truth.

Squirrel B : Squirrel D D ate twice as much as me!

Squirrel C : Unlike others, only I ate 2 walnuts as you told.

Squirrel D : Squirrel C C ate more than squirrel B B .

Squirrel E : I ate the least. The others all ate more than me.

Fortunately, squirrel A A had a lie-detector and knew one of the four lied.

Which squirrel was a liar? How many walnuts did each squirrel eat? (Plug in the answers as the name of the liar first (use 1, 2, 3, 4 for B , C , D , E B, C, D, E respectively) then followed by the amounts of B , C , D , E B, C, D, E shares respectively. For example, if your answer is B B is the liar and the walnuts for B = 1 , C = 2 , D = 3 , E = 4 B=1, C=2, D=3, E=4 , the input will be 11234 11234 .)


The answer is 22341.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Gustavo Cardenas
Aug 12, 2015

Let's assume that C and D are telling the truth, it means that C ate 2 walnuts and B ate only 1 walnut. If E is telling the truth, that means that he ate less than B, but that's not possible because he ate at least 1 (all of them were chewing). So B should be telling the truth, but that means that D ate 2 walnuts, the same as C, and it contradicts what C said ("unlike others"). So C and D cannot be both telling the truth, one of them is the liar.

Let's assume D is the liar, so C ate 2 walnuts and B ate 3 or more. But if B ate 3, D should've eaten 6, but we only have 10 walnuts, so D can't be lying.

So C is the liar, he didn't eat 2 walnuts but he should've eaten more than B. D ate twice as B, so B should've eaten 2 or 1 walnuts, but he couldn't eat 1 because E ate less than B but at least 1. So B ate 2, D ate 4, E ate 1 and C ate the remaining 3.

Answer: 22341

That was nicely done. Thank you for your solution. ;)

Worranat Pakornrat - 5 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...