HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


222. 50302 - Paper Scissors Rock

Guest
• Review clarifications (1)

Volume problems

• 040. 50879 - Passed or Failed
• 040. Problem 1
• 055. 50355 - Bills of City Water Co...
• 060. 50583 - Max of 3 numbers
• 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 - Pentagonal Numbers
• 050. 50568 - Body Mass Index Calc...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
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