ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Beginners > задача:


222. 50302 - Paper Scissors Rock

Гость
• Вопросы к жюри (1)

Задачи сборника

• 040. 50879 - Passed or Failed
• 040. Student results
• 055. 50355 - Bills of City Water Co...
• 060. 50583 - Numri ma te madhe n...
• 065. 50436 - Pocket Money
• 070. 50439 - Telephone Calls
• 080. 50478 - Letter Grades
• 090. 50422 - Area and Perimeter of...
• 222. 50302 - Paper Scissors Rock
• 50310 - Kinetic Energy
• 50314 - Falling Distance
• 50579 - Numrat pentagonal
• 050. 50568 - Llogaritesi i indeksit te...

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 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


Для отправки решений необходимо выполнить вход.

www.contester.ru