Hi @YI_LI_WU,
Based on the information provided, let’s assume you’ll input the number of players who will be participating in the game. You can then dynamically create either a Dictionary or an Integer Array, where the size corresponds to the number of players. Initialize all the values (or indexes) to 0.
Each player will take turns sequentially. Every time it’s a player’s turn, you’ll increment their value in the array or dictionary by 1. The process continues like this, looping through each player, until someone guesses the correct number.
Once a player guesses the number, you can stop the process and determine the winner.
Hope this helps!