結果

問題 No.24 数当てゲーム
ユーザー No-RaNo-Ra
提出日時 2017-08-26 10:46:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 802 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-23 17:04:52
合計ジャッジ時間 816 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 RE -
testcase_05 AC 27 ms
10,880 KB
testcase_06 RE -
testcase_07 AC 25 ms
10,752 KB
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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]))
0