結果

問題 No.24 数当てゲーム
ユーザー gemmarogemmaro
提出日時 2019-08-08 18:17:10
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 184 bytes
コンパイル時間 551 ms
コンパイル使用メモリ 11,472 KB
実行使用メモリ 15,340 KB
最終ジャッジ日時 2023-09-26 01:22:10
合計ジャッジ時間 1,890 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,152 KB
testcase_01 AC 79 ms
15,300 KB
testcase_02 AC 80 ms
15,340 KB
testcase_03 AC 80 ms
15,248 KB
testcase_04 AC 80 ms
15,132 KB
testcase_05 AC 79 ms
15,136 KB
testcase_06 AC 80 ms
15,176 KB
testcase_07 AC 79 ms
15,172 KB
testcase_08 AC 80 ms
15,128 KB
testcase_09 AC 80 ms
15,248 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - i
Syntax OK

ソースコード

diff #

b = []
c = (0..9).to_a
for i in 1..gets.chomp.to_i
    w = gets.chomp.split
    n = w.slice(0..3).map &:to_i
    if w[-1] == "YES" then c &= n
    else b |= n; c -= n end
end
puts c[0]
0