“Two MIT math graduates bump into each other. They hadn’t seen each other in over 20 years.
The first grad says to the second: “how have you been?”
Second: “Great! I got married and I have three daughters now”
First: “Really? how old are they?”
Second: “Well, the product of their ages is 72, and the sum of their ages is the same as the number on that building over there..”
First: “Right, ok.. oh wait.. I still don’t know”
second: “Oh sorry, the oldest one just started to play the piano”
First: “Wonderful! my oldest is the same age!” Problem: How old are the daughters?”
Google interview questions | TechInterviews
My answer (just quickly):
x*y*z=72
x < 20
y <= x
z <= y
72 = 36 * 2 #36 over 20 years
72 = 18 * 2 * 2
72 = 9 * 2 * 2 * 2
Oldest under 20 and old enough to play piano but just started, assuming no twins.
Possible ages are 9, 4 and 2