|
Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Prepared by Halil Karimis.
Paper Scissors Rock
Write a program that plays the game of “Rock, Paper, and Scissors.”
In this game, two players simultaneously say (or display a hand symbol representing) either “rock,” “paper,” or “scissors.” The winner is the one whose choice dominates the other. The rules are: paper dominates (wraps) rock, rock dominates (breaks) scissors, and scissors dominate (cut) paper.
The game has only three possible outcomes other than a tie: a player who decides to play rock will beat another player who has chosen scissors ("rock crushes scissors") but will lose to one who has played paper ("paper covers rock"); a play of paper will lose to a play of scissors ("scissors cut paper"). If both players throw the same shape, the game is tied.
Input specification
You will enter two text data in two lines as players choices;
-In the first line you will enter first player’s choice.
-In the following line second player’s choice will be entered.
Output specification
Your program should display an output as “Player1 wins” , “Player2 wins” or “You tied”.
Sample Input I
Rock
Paper
|
Sample Input II
Scissors
Paper
|
Sample Input III
Rock
Rock
|
Sample Output I
Player2 wins
|
Sample Output II
Player1 wins
|
Sample Output III
You tied
|
Для отправки решений необходимо выполнить вход.
|