結果

問題 No.24 数当てゲーム
ユーザー Naoki_M_Naoki_M_
提出日時 2015-11-05 22:09:27
言語 Ruby
(3.2.2)
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 212 bytes
コンパイル時間 37 ms
コンパイル使用メモリ 11,300 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-10-11 14:08:40
合計ジャッジ時間 1,563 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,332 KB
testcase_01 AC 87 ms
15,332 KB
testcase_02 AC 81 ms
15,084 KB
testcase_03 AC 81 ms
15,124 KB
testcase_04 AC 80 ms
15,168 KB
testcase_05 AC 81 ms
15,316 KB
testcase_06 AC 80 ms
15,248 KB
testcase_07 AC 81 ms
15,116 KB
testcase_08 AC 80 ms
15,180 KB
testcase_09 AC 80 ms
15,352 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i
as = (0..9).to_a
n.times do
  a, b, c, d, r = gets.chomp.split.map { |x| x.length == 1 ? x.to_i : x }
  if r == 'YES'
    as &= [a, b, c, d]
  else
    as -= [a, b, c, d]
  end
end

puts as[0]
0