-->
当前位置:首页 > 题库

PROGRAMMING:Stone scissors cloth

Luz5年前 (2021-05-10)题库497
###Task description
```
Stone scissors cloth, is a guessing game. Originated in China, and then spread to Japan, Korea and other places, with the continuous development of Asia Europe trade, it spread to Europe, and gradually swept the world in modern times.
The simple and clear rules make the stone scissors cloth have no loopholes to drill. The single play method competes with luck, and the multi round play method competes with psychological game, which makes the ancient game of stone scissors cloth be used for both "accident" and "technology" and deeply loved by people all over the world.
Rules of the game: stone scissors, cloth stone, scissors cut cloth.
Now, you need to write a program to judge the result of the stone scissors cloth game.
```
###Input format:
```
The input includes N + 1 lines:
The first line is an integer n, which means that a total of n games have been played. 1 <= N <= 100。
Each of the next N lines contains two strings representing the choice of player 1 and player 2 (stone, scissors or cloth)
S1 S2
Strings are separated by spaces, S1, S2 can only be in {"rock", "scissors", "paper"} (case sensitive).
```
###Output format:
```
The output includes N lines, and each line corresponds to a winner (player 1 or player 2). If the game draws, tie will be output.
```
###Input example:
```in
three
Rock Scissors
Paper Paper
Rock Paper
```
###Output example:
```out
Player1
Tie
Player2
```
###Tips
Rock is stone, scissors is scissors, paper is cloth.
###Title Source
Note: this topic is selected from openjudge website http://noi.openjudge.cn/ch0107/04/






answer:If there is no answer, please comment