結果

問題 No.24 数当てゲーム
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-01-15 17:53:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 8,044 KB
最終ジャッジ日時 2023-08-23 10:59:33
合計ジャッジ時間 1,011 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

if __name__ == '__main__':
    yes_list = []
    no_list = []

    n = int(input())
    for _ in range(n):
        *numbers, r = input().split()
        (yes_list if r == 'YES' else no_list).extend(map(int, numbers))
    
    memo = list(range(10))
    for x in no_list: memo[x] = None

    l = len(yes_list)
    if l == 0: answer = [x for x in range(10) if memo[x] is not None]
    if l == 4: answer = [x for x in range(10) if x in yes and memo[x] is not None]
    if l >  4: answer = [x for x in range(10) if yes_list.count(x) > 1 and memo[x] is not None]

    print(answer[0])
0