#P3150. pb的游戏(1)
pb的游戏(1)
Description
The rules are as follows:
- The first player splits the given number into the sum of two positive integers. Then the second player chooses one of the two numbers produced in the previous move and splits it again. The two players take turns. When a player cannot make a move, the other player wins.
Now you need to determine the winner for games.
We assume both players play optimally. In each game, pb moves first. If pb has a winning strategy, output pb wins; otherwise output zs wins.
Input Format
The first line contains an integer , the number of test cases.
Then follow lines. Each line contains an integer , the initial number for that game.
Output Format
Output lines. Each line contains a string indicating the game result.
5
1
3
7
20
5
zs wins
zs wins
zs wins
pb wins
zs wins
Hint
Constraints: For all testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号