A Logic Riddle
Marvin the Math teacher is speaking to his three students, Alice, Bob and Charlie. Jerry the Janitor is nearby, emptying trash cans and eavesdropping.
Marvin: "I'm going to give each of you students a card with a single-digit prime number on it. You can each look at your own card, but not the others. I challenge you to figure out who has what number by asking me questions about their sum."
Alice: "Wait, before we begin, are these numbers distinct or is it possible that some of us have the same number?"
Marvin: (answer inaudible due to Jerry dropping a trash can)
Alice: "Thank you. First, what's the parity of the sum?
Marvin: "The sum of your numbers is even. Bob, you're next."
Jerry: "Hey, I couldn't hear the answer about distinct numbers. Are duplicates allowed or not?"
Bob: "Hush, you're just the janitor. We all heard his answer, that's the important part. My question is, is the sum of the three numbers divisible by 4?"
Marvin: "Yes. Charlie, what do you have to say?"
Jerry: "Excuse me, I'd still like to know if duplicate numbers are allowed."
Charlie: "Please don't interrupt me! I've almost got it - I've figured out what all the numbers are, I'm just not sure who has what."
Alice: "Ah ha! Now I know everyone's number."
Jerry: "Please, I gotta know! Are the numbers distinct or not???"
Bob: "I know everyone's number too, and not to brag, but I figured it out before Alice. Now, Janitor, the answer to your question is-"
Jerry: "Never mind, I figured it out."
What number did each student have?