結果

問題 No.24 数当てゲーム
コンテスト
ユーザー ABKZ
提出日時 2021-06-16 01:08:34
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 334 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 402 ms
コンパイル使用メモリ 85,120 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2026-06-02 13:40:59
合計ジャッジ時間 1,609 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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