I've got this riddle from a friend at work.
Say we have 100 dwarves. They all receive little dwarven shirts with numbers between 0-99 (With repetitions), and after that they all enter into a room. (So that they can see all the other dwarves numbers but not their own number.)
They need to decide on an algorithm before entering the room so that they all call out the same number at the same time and at least one of the dwarves will have that number on his shirt.
While in the room they they can't exchange any type of information: they can't talk or arrange in any way (Like sorting themselves out and such).
What's the algorithm? :)