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

Разделы > Ad-Hoc > задача:


50302 - Paper Scissors Rock

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

Задачи раздела

• 50454 - What day is it?
• 50474 - Sum of Two Primes
• 50597 - Vizatojme Diamante
• 50253 - Timer
• 50294 - Centimeters to Yards
• 50303 - Pattern
• 50882 - FizzBuzz
• 50322 - Snake Pattern
• 50302 - Paper Scissors Rock
• 50396 - Cinema Tickets - 1
• 50366 - Student Averages (2 Grades)
• 50357 - Convert Euros into Dollars
• 50466 - Drawing Square From Stars
• 50351 - Convert inches to cm
• 50356 - Hours Passed
• 50350 - Fahrenheit to Celsius
• 50355 - Bills of City Water Company

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

Если у вас есть предложения или пожелания по работе 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