結果

問題 No.24 数当てゲーム
ユーザー ABKZ
提出日時 2021-06-16 01:08:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 334 bytes
コンパイル時間 689 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-12-28 07:41:00
合計ジャッジ時間 1,479 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [input().split() for _ in range(N)]

yes = [set(map(int, front)) for *front, tail in A if tail == "YES"]
no = [set(map(int, front)) for *front, tail in A if tail == "NO"]

overt = set(range(10))
for s in yes:
  overt &= s

potential = set(range(10))
for s in no:
  potential -= s

print((potential & overt).pop())
0