結果

問題 No.24 数当てゲーム
ユーザー coder_So_heycoder_So_hey
提出日時 2022-12-31 17:52:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 855 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-05 00:14:09
合計ジャッジ時間 1,727 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(input())
num = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
cand = []
answer = []
bool = False

for i in range(N):
    A, B, C, D, R = map(str, input().split())
    if R == "NO":
        num[int(A)] = -1
        num[int(B)] = -1
        num[int(C)] = -1
        num[int(D)] = -1
    if R == "YES":
        bool = True
        if A in cand:
            answer.append(int(A))
        else:
            cand.append(A)
        if B in cand:
            answer.append(int(B))
        else:
            cand.append(B)
        if C in cand:
            answer.append(int(C))
        else:
            cand.append(C)
        if D in cand:
            answer.append(int(D))
        else:
            cand.append(D)

for i in range(10):
    if bool:
        if (num[i] != -1) and (i in answer):
            print(i)
    else:
        if num[i] != -1:
            print(i)
0