結果
問題 |
No.24 数当てゲーム
|
ユーザー |
|
提出日時 | 2017-05-01 20:11:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 169 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-14 01:59:07 |
合計ジャッジ時間 | 1,230 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
n = int(input()) l = [] s1 = set() s2 = set() for i in range(n): l += [input().split()] if l[i][-1] == "NO": s1 |= set(l[i]) else: if len(s2) == 0: s2 = set(l[i]) else: s3 = s2 | set(l[i]) s2 &= set(l[i]) s1 |= set([x for x in s3 if x not in s2]) if len(s2) > 1: s2.remove("YES") a="" for i in s2: if i not in s1: a = i if a == "": for i in range(10): if str(i) not in s1: a = i print(a)