No.264 Rock Paper Scissors
問題文最終更新日: 2026-06-25 05:48:55
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 117
(順位表)
の他の問題:
Problem Statement
You play rock-paper-scissors against an opponent.
Print the result of the game to standard output.
Print "Won" if you win, "Lost" if you lose, and "Drew" if it is a draw.
Input
N KRock, scissors, and paper are represented by 0, 1, and 2, respectively. The first value is your hand and the second value is your opponent's hand.
Output
Print the result of your rock-paper-scissors game to standard output.
Sample
Sample 1
Input
0 0
Output
Drew
You play rock (0) and your opponent also plays rock (0), so it is a draw (Drew).
Sample 2
Input
2 0
Output
Won
You play paper (2) and your opponent plays rock (0), so you win (Won).
Sample 3
Input
2 1
Output
Lost
You play paper (2) and your opponent plays scissors (1), so you lose (Lost).
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。