結果

問題 No.24 数当てゲーム
ユーザー reforefo2reforefo2
提出日時 2020-05-03 18:15:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 747 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 10,988 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-03 22:35:12
合計ジャッジ時間 997 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,864 KB
testcase_01 AC 16 ms
7,924 KB
testcase_02 AC 16 ms
7,924 KB
testcase_03 AC 16 ms
7,856 KB
testcase_04 AC 16 ms
7,916 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 AC 16 ms
7,808 KB
testcase_07 AC 16 ms
7,944 KB
testcase_08 AC 16 ms
7,776 KB
testcase_09 AC 16 ms
7,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
List = []
Numset = [0,1,2,3,4,5,6,7,8,9]
Ans = []
for i in range(N):
    List.append(input().split())
for i in range(N):
    if List[i][4] == "NO":
        a = int(List[i][0])
        b = int(List[i][1])
        c = int(List[i][2])
        d = int(List[i][3])
        if a in Numset:
            Numset.remove(a)
        if b in Numset:
            Numset.remove(b)
        if c in Numset:
            Numset.remove(c)
        if d in Numset:
            Numset.remove(d)
    if List[i][4] == "YES":
        for j in range(10):
            if j != int(List[i][0]) and j != int(List[i][1]) and j != int(List[i][2]) and j != int(List[i][3]):
                if j in Numset:
                    Numset.remove(j)
print(int(Numset[0]))
0