結果

問題 No.24 数当てゲーム
コンテスト
ユーザー konabe
提出日時 2018-04-20 14:39:44
言語 Python3
(3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 19 ms / 5,000 ms
+ 302µs
コード長 372 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 196 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2026-11-15 14:47:45
合計ジャッジ時間 1,913 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
Args = [input().split() for i in range(N)]
candidate = [ str(i) for i in range(10)]

for arg in Args:
    if arg[4] == 'YES':
        candidate = list(set(arg[:-1]).intersection(set(candidate)))
    if arg[4] == 'NO':
        candidate = list(set(candidate).difference(set(arg[:-1])))
    if len(candidate) == 1:
        break
        
print(candidate[0])
0