The whole town played the lottery: 165 people won the jackpot In the numerical game of chance played by guessing…