結果

問題 No.24 数当てゲーム
ユーザー WatsonWatson
提出日時 2017-08-01 13:17:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 527 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-19 13:22:27
合計ジャッジ時間 845 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

A = ["0","1","2","3","4","5","6","7","8","9"]
B = []
N = int(input())
ans = 0
for i in range(N):
    X = input().split()
    for c in range(4):
        if X[-1] == "NO":
            if X[c] in A:
                A.remove(X[c])
            elif X[c] in B:
                B.remove(X[c])
        else:
            if X[c] in A:
                B.append(X[c])
if len(A) == 1:
    print(A[0])
elif len(B) == 1:
    print(B[0])
else:
    for i in range(len(B)):
        if B.count(B[i]) != 1:
            ans = B[i]
    print(ans) 
0