結果
問題 |
No.24 数当てゲーム
|
ユーザー |
|
提出日時 | 2017-08-26 10:46:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 802 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-15 17:37:10 |
合計ジャッジ時間 | 1,042 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 RE * 4 |
ソースコード
N = int(input()) inlist = [] for i in range(N): inlist.append(input().split()) ans_yes_list = [] ans_no_list = [] for _ in inlist: if _[4] == "YES": for n in range(4): ans_yes_list.append(_[n]) if _[4] == "NO": for n in range(4): ans_no_list.append(_[n]) s = set() uq_ans_yes_list = list(set([x for x in ans_yes_list if x in s or s.add(x)])) uq_ans_no_list = [] for _ in ans_no_list: if _ not in uq_ans_no_list: uq_ans_no_list.append(_) if len(uq_ans_no_list) == 9: temp = [str(i) for i in range(10)] for _ in uq_ans_no_list: temp.remove(str(_)) print(int(temp[0])) else: for _ in uq_ans_yes_list: if _ in uq_ans_no_list: uq_ans_yes_list.remove(str(_)) print(int(uq_ans_yes_list[0]))