結果

問題 No.24 数当てゲーム
ユーザー arito_asuarito_asu
提出日時 2020-06-13 17:16:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 413 bytes
コンパイル時間 858 ms
コンパイル使用メモリ 11,020 KB
実行使用メモリ 8,036 KB
最終ジャッジ日時 2023-09-07 21:44:33
合計ジャッジ時間 1,304 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(input())
inp = []
for i in range(N):
    inp.append(input().split())
    
cards = list('0123456789')
pos = []

for t in inp:
    isIn = t.pop(-1)
    if isIn == "NO":
        for n in t:
            cards.remove(n)
    else:
        pos.extend(t)
        
if len(cards) == 1:
    ans = cards[0]
elif len(set(cards) & set(pos)) == 1:
    ans = set(cards) & set(pos)
else:
    ans = cards[0]
    
print(ans)
0