Two Philosophers Problem

A problem doing the rounds (way too hard for an interview question though):

There are 2 numbers between 1 and 100 (not including 1 or 100, and they are different).
Socrates knows their sum. Plato knows their product.
Socrates knows that Plato knows the product.
Plato knows that Socrates knows the sum.

They meet and talk…
Socrates says “I don’t know the numbers, but neither do you”
Plato says “Now I know them”
Socrates says “Me too”.

What are the numbers?

I did a solution in C#.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s