5. At a party, there are nine people. Upon entering, some people greeted each other by shaking hands. Quintijn is present at the party and asks everyone else how many people they have shaken hands with. He receives eight different answers.

How many people did he shake hands with?
A) 0
B) 1
C) 2
D) 3
E) 4
A5. E) 4 Of the eight people Quintijn meets at the party, let's call them A, B, C, D, E, F, G, and H in ascending order of the number of hands they shake. Since there are a total of 9 people present, the number of hands someone shakes is always a number from 0 to 8. If someone shakes 8 hands, then he shakes hands with everyone and no one can shake 0 hands. The answers Quintijn hears are therefore either the numbers 0 to 7 or the numbers 1 to 8. We will consider the two cases separately.

- Suppose A, B, .., H shake $0,1, \ldots, 7$ hands.

Person H shakes 7 hands and thus shakes hands with everyone except A. Person B shakes hands with H and no one else.

Person G shakes 6 hands and thus shakes hands with everyone except A and B. Person C has already shaken 2 hands (with H and G) and shakes no one else's hand.

Person F shakes 5 hands and thus shakes hands with everyone except A, B, and C. Person D has then already shaken 3 hands (with H, G, and F) and shakes no one else's hand. Person E shakes 4 hands and thus shakes hands with everyone except A, B, C, and D. We see that Quintijn shakes hands with exactly four people, namely H, G, F, and E.

- Suppose A, B, .., H shake $1,2, \ldots, 8$ hands.

Person H shakes 8 hands and thus shakes hands with everyone. Person A shakes hands with H and no one else.

Person G shakes 7 hands and thus shakes hands with everyone except A. Person B has already shaken 2 hands (with H and G) and shakes no one else's hand.

Person F shakes 6 hands and thus shakes hands with everyone except A and B. Person C has then already shaken 3 hands (with H, G, and F) and shakes no one else's hand.

Person E shakes 5 hands and thus shakes hands with everyone except A, B, and C. Person D has then already shaken 4 hands (with H, G, F, and E) and shakes no one else's hand. We see that Quintijn shakes hands with exactly four people, namely H, G, F, and E.

We conclude that in both cases, Quintijn shakes hands with exactly four people.