結果

問題 No.24 数当てゲーム
ユーザー 立川和樹立川和樹
提出日時 2022-04-04 18:17:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 1,052 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 71,760 KB
最終ジャッジ日時 2023-08-16 20:18:38
合計ジャッジ時間 2,233 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

N = int(input())
A = []#数値
B = []

C = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
C = set(C)
for i in range(N):
    turn = input().split()
    if turn[-1] == "Yes":
        A.append(turn[:-1])
    else:
        B.append(turn[:-1])

A_s = set(sum(A, []))
B_s = set(sum(B, []))

candidate = A_s - B_s 

A_2 = list(map(set,A))

if len(A) >= 2:
    D = A_2[0] & A_2[1]
    for i in range(len(A) - 2):
        D = D & A_2[i+2]
    print(D & candidate)

elif len(A) == 1:
    print (candidate)

else :
    print (C - B_s)
0