#C4667. Determining the Game Winner
Determining the Game Winner
Determining the Game Winner
You are given T test cases. For each test case a single integer X is provided which represents a game state. The rule to determine the winner is as follows:
If X = 1 then Player 2 wins; otherwise, Player 1 wins.
In mathematical notation, let \(w(X)\) denote the winner for a given X. Then, the rule can be written as:
\[ w(X)=\begin{cases}2,&\text{if }X=1,\\1,&\text{otherwise.}\end{cases} \]You need to process all test cases and output the winner for each on a new line.
inputFormat
The first line of the input contains a single integer T indicating the number of test cases. This is followed by T lines, each containing a single integer X representing a game state.
outputFormat
For each test case, output a single integer on a new line which is the winner of the game according to the rule: if X equals 1, output 2; otherwise, output 1.
## sample1
1
2
</p>