Three coworkers Riddle Problem
Posted
by John S
on Stack Overflow
See other posts from Stack Overflow
or by John S
Published on 2010-04-14T08:49:30Z
Indexed on
2010/04/14
8:53 UTC
Read the original article
Hit count: 493
This isn't homework, I've got a solution, however it doesn't protect against cheaters.
Three coworkers would like to know their average salary. However, they are self-conscious and don't want to tell each other their own salaries, for fear of either being ridiculed or getting their houses robbed. How can they find their average salary, without disclosing their own salaries?
Now, a solution that requires the last person to tell the group the sum isn't allowed because that person could cheat.
© Stack Overflow or respective owner