This question already has an answer here:
10 people will stand in a circle, and each have a hat placed on their head. The hats will each be labeled with a digit between 0 and 9, with repeats allowed. They will be able to see everyone's hat but their own. After looking around, they must all simultaneously guess the digit on their hat. Before this happens, the team may agree on a strategy, but once the game begins, they may not communicate in any way. They win as long as at least one person guesses correctly. Show how the team can guarantee victory.