結果

問題 No.24 数当てゲーム
ユーザー 👑 もぐら 3.0もぐら 3.0
提出日時 2023-11-13 19:43:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 556 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 53,460 KB
最終ジャッジ日時 2023-11-13 19:43:37
合計ジャッジ時間 1,201 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

box = set()
for i in range(10):
    box.add(i)

N = int(input())
for i in range(N):
    A,B,C,D,R = map(str,input().split())
    if R=="NO":
        if int(A) in box:
            box.remove(int(A))
        if int(B) in box:
            box.remove(int(B))
        if int(C) in box:
            box.remove(int(C))
        if int(D) in box:
            box.remove(int(D))
    else:
        for n in range(1,10):
            if n !=int(A) and n !=int(B) and n !=int(C) and n !=int(D):
                if n in box:
                    box.remove(n)

print(*box)
0