結果

問題 No.24 数当てゲーム
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-01-27 23:55:13
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 181 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 11,424 KB
実行使用メモリ 15,300 KB
最終ジャッジ日時 2023-10-12 18:05:42
合計ジャッジ時間 1,637 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,140 KB
testcase_01 AC 78 ms
15,248 KB
testcase_02 AC 78 ms
15,228 KB
testcase_03 AC 79 ms
15,300 KB
testcase_04 AC 78 ms
15,116 KB
testcase_05 AC 83 ms
15,032 KB
testcase_06 AC 78 ms
15,208 KB
testcase_07 AC 78 ms
15,224 KB
testcase_08 AC 77 ms
15,148 KB
testcase_09 AC 78 ms
15,220 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i
a = (0..9).to_a

n.times do
  l = gets.chomp.split
  f = l[-1]
  l = l.slice(0, 4).map(&:to_i)

  if f == 'YES'
    a &= l
  else
    a -= l
  end
end
puts a[0]
0