You are in a room, with 6 people. 2 of them are liars. The room has a code pad. The people say:

People What they say
Keith The first and last digit are the same number and are not used anywhere else in the code. The numbers in question are prime numbers.
Sabrina The code does not include any eights or nines.
Cassiopeia The last four numbers follow the fourth row of Pascal's triangle.
Andrea There are no odd numbers in the latter half of the code.
Zach The three digits after the first digit follow the Fibonacci sequence after 1.
Bernard The five digits of the code before the ninth digit each decreases by 1.

They also say an extra line of dialogue which say:

People What they say
Keith Don't trust Cassiopeia.
Sabrina You can trust Keith.
Cassiopeia Don't listen to Keith or Sabrina.
Andrea Don't trust Sabrina, and even Bernard.
Zach Don't trust Andrea.
Bernard Trust Zach, but not Andrea.

Who is lying, and what is the code?

  • 1
    $\begingroup$ Is the code 10 digit or 9 digits $\endgroup$ Commented Mar 23, 2021 at 6:14

1 Answer 1


First find out who the two liars are:

From their dialogue, we know that either Keith or Cassiopeia is a liar, and that either Andrea or Bernard is a liar. This means both Sabrina and Zach are trustworthy (since there are only two liars). We then know Cassiopeia and Andrea are liars since Sabrina is trustworthy.

Now we can tally our clues:


Our code is in the form of x...x and x is one of 2, 3, 5, 7.


Our code page includes 0 to 7.


(Liar, so inverted) The last four numbers do not follow 1, 4, 6, 4, 1


(Liar, so inverted) The latter half contains at least one odd digit.


The code is like x123xxx... or x235xxx...


So we have xxx76543...xxx or something


Because we don't have 8s or 9s, the Bernard sequence can only range from 76543 to 43210.

Because the first and the last digits aren't used anywhere else, it can't be 3 (since it always appear in Bernard's sequence.

Note how Zach and Bernard has a common digit, we know our number is like x2354321xx...

So the Keith number can only be 7, and our number is 72354321xx..x7

I don't know what next, unfortunately.

Assume all information has been given, then our code is:

723543217, otherwise we don't know what would come before the last digit.

  • $\begingroup$ The "who's a liar" answer is even simpler than that. It logically follows just from the statements of the two liars themselves. $\endgroup$
    – Ben Barden
    Commented Mar 23, 2021 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.