結果

問題 No.24 数当てゲーム
ユーザー coder_So_heycoder_So_hey
提出日時 2022-12-31 17:52:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 855 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-26 15:51:59
合計ジャッジ時間 1,036 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 6
権限があれば一括ダウンロードができます

ソースコード

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