結果

問題 No.24 数当てゲーム
ユーザー zimphazimpha
提出日時 2017-12-09 11:11:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 259 bytes
コンパイル時間 1,648 ms
コンパイル使用メモリ 86,716 KB
実行使用メモリ 71,428 KB
最終ジャッジ日時 2023-08-20 02:52:38
合計ジャッジ時間 1,878 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,312 KB
testcase_01 AC 82 ms
71,160 KB
testcase_02 AC 75 ms
71,288 KB
testcase_03 AC 76 ms
71,076 KB
testcase_04 AC 75 ms
71,144 KB
testcase_05 AC 73 ms
71,312 KB
testcase_06 AC 73 ms
71,340 KB
testcase_07 AC 74 ms
71,428 KB
testcase_08 AC 75 ms
71,372 KB
testcase_09 AC 74 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
candidate = set([str(i) for i in range(10)])
invalid = set()
for i in range(n):
  q = input().split()
  q, r = set(q[:4]), q[-1]
  if r == "YES":
    candidate = candidate.intersection(q)
  else:
    invalid |= q
print(*(candidate - invalid))
0