CodeDrill
day_streak: --
← 問題一覧に戻る
Python ・ Standard I/O

Problem 52: Rock-Paper-Scissors Result

Two integers A and B are given on one line, separated by a space. A is your hand and B is the opponent's hand, where 0=Rock, 1=Scissors, 2=Paper. If you win, output Win; if you lose, output Lose; if it's a tie, output Draw.

Constraints

0 ≤ A, B ≤ 2

Input example 1

0 1

Output example 1

Win

Input example 2

1 1

Output example 2

Draw

What you'll train

Specify the output

What you get

  • Define the correspondence
  • Make the win/lose rules explicit
  • Specify the output words

How to ask the AI

Clearly convey the mapping 0=Rock, 1=Scissors, 2=Paper, along with the specific rules for which hand beats which. It's also safer to explicitly state the output words Win/Lose/Draw.

If you ask vaguelyThe win/lose relationship between rock, scissors, and paper gets implemented backwards, swapping wins and losses.

あなたのコード

実行しました

プレビュー

AIレビュー(プロンプト練習)

コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。

先にコードを実行し、テストを1つ以上通してください。