Two Numbers Puzzle-Asked in Amazon interviews.


Ben has 2 integers. He tells sum of the integers to the person S and product of those numbers to P.Now there is this conversation between S and P.

S: I don’t know what the numbers are

P: Neither do I

S: Now, I know what the numbers are.

P: Hey, me too.

Assuming S and P to be very wise and good in mathematics, What are those two integers?

Solution: The two numbers are 2 and 2.

S would have got 4, which means 1 + 3 or 2 + 2. so that’s why he was not sure of the numbers.P would have also got 4, possibilities 14 and 22.Now, had the numbers be 1 and 3, P would have got 3 and he would have been sure of the numbers, but that was not the case, So S became sure that numbers are 2 and 2.Now, P knows that numbers cant be 1 and 4, because there are two possibilities of getting the sum as 5, 1+4, 2+3, and in both these cases S cant guess the number depending on P’s earlier answer, as for both product 4 and 6 there are more than 1 possibilities.Thus P also knows that the numbers are 2 and 2.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.




Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Ants Puzzle

12 Quick Tips For Students To Fall In Love With Mathematics

Mathematics: A Gym For The Mind?

Indicators for Traders: Donchian Channel

Understanding the Fundamental Theorem of Calculus

An Introduction to Quantum Computing: Understanding Shor’s Algorithm

Fisher’s exact test from scratch with Python

Machine Learning — The Intuition of Markov’s Inequality

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Upskilling students for tech placements!

More from Medium

Jelly Beans Jars Puzzle

6 Steps template to actually pass your next FAANG technical interview. Part 1 out of 6.

Why I am writing leetcode posts, and how it can help

Interview @Discovery+