結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 31 ms
10,880 KB
testcase_03 WA -
testcase_04 RE -
testcase_05 AC 26 ms
10,752 KB
testcase_06 RE -
testcase_07 AC 26 ms
10,880 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])

uq_ans_no_list = []
for _ in ans_no_list:
    if _ not in uq_ans_no_list:
        uq_ans_no_list.append(_)

s = set()
uq_ans_yes_list = list(set([x for x in ans_yes_list if x in s or s.add(x)]))

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