結果

問題 No.24 数当てゲーム
コンテスト
ユーザー kanoekakihito
提出日時 2018-09-22 14:06:00
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 93 ms / 5,000 ms
+ 158µs
コード長 376 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 292 ms
コンパイル使用メモリ 21,540 KB
実行使用メモリ 15,864 KB
最終ジャッジ日時 2026-08-16 19:32:14
合計ジャッジ時間 2,621 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n= int(input())
response = {input() for line in range(n)}
NO = {i for i in response if i[-2:] == "NO"}
y = tuple(map(lambda s: "".join([c for c in s if c.isdigit()]), response - NO))
if len(y) == 0:
	YES = {}
else:
	YES = set("".join(map(lambda i: i if all([(i in r) for r in y]) else "", y[0])))
print("".join((YES if len(YES) > 0 else set("0123456789")) - set("".join(NO))))
0