結果

問題 No.264 じゃんけん
ユーザー enen
提出日時 2016-03-21 21:08:16
言語 Ruby
(3.2.2)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 376 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 11,320 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-07-24 17:21:14
合計ジャッジ時間 1,579 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
15,164 KB
testcase_01 AC 70 ms
15,036 KB
testcase_02 AC 73 ms
15,164 KB
testcase_03 AC 71 ms
15,088 KB
testcase_04 AC 75 ms
15,176 KB
testcase_05 AC 70 ms
15,264 KB
testcase_06 AC 71 ms
15,352 KB
testcase_07 AC 73 ms
15,328 KB
testcase_08 AC 71 ms
15,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,k = gets.split.map(&:to_i)

if n == 0 then
  case k
  when 0
    puts"Drew"
  when 1
    puts"Won"
  when 2
    puts"Lost"
  end

elsif n == 1 then
    case k
    when 0
      puts"Lost"
    when 1
      puts"Drew"
    when 2
      puts"Won"
    end
elsif n == 2 then
    case k
    when 0
      puts"Won"
    when 1
      puts"Lost"
    when 2
      puts"Drew"
    end
end
0