結果

問題 No.24 数当てゲーム
ユーザー Kaito KoikeKaito Koike
提出日時 2018-03-28 14:22:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 730 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 7,892 KB
最終ジャッジ日時 2023-09-07 19:24:19
合計ジャッジ時間 1,177 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,820 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 AC 16 ms
7,808 KB
testcase_03 AC 15 ms
7,840 KB
testcase_04 AC 16 ms
7,788 KB
testcase_05 AC 16 ms
7,892 KB
testcase_06 AC 15 ms
7,820 KB
testcase_07 AC 15 ms
7,868 KB
testcase_08 AC 15 ms
7,844 KB
testcase_09 AC 15 ms
7,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


taro_suggest_list = []
all_turn = int(input())


for turn in range(all_turn):
    number_list = [ i for i in range(10) ]
    taro_suggest_and_answer = input().split(" ")

    taro_suggest = list(map(int,taro_suggest_and_answer[:4]))

    answer = taro_suggest_and_answer[4]

    if answer =="YES":
        taro_suggest_list.append(taro_suggest)
    else:
        for number in taro_suggest:
            number_list.remove(int(number))
        taro_suggest_list.append(number_list)

answer_list = [t for t in taro_suggest_list[0]]

for n in taro_suggest_list[0]:
    for i in range(all_turn):
        if n not in taro_suggest_list[i]:
            if n in answer_list:
                answer_list.remove(n)

print(answer_list[0])
0