結果
問題 | No.24 数当てゲーム |
ユーザー | R N |
提出日時 | 2020-08-04 14:18:35 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 784 bytes |
コンパイル時間 | 123 ms |
コンパイル使用メモリ | 10,936 KB |
実行使用メモリ | 7,908 KB |
最終ジャッジ日時 | 2023-10-12 16:44:46 |
合計ジャッジ時間 | 937 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 17 ms
7,864 KB |
testcase_01 | AC | 17 ms
7,880 KB |
testcase_02 | AC | 16 ms
7,812 KB |
testcase_03 | WA | - |
testcase_04 | RE | - |
testcase_05 | AC | 16 ms
7,884 KB |
testcase_06 | RE | - |
testcase_07 | AC | 15 ms
7,756 KB |
testcase_08 | RE | - |
testcase_09 | RE | - |
ソースコード
# coding:utf-8 n = int(input()) ans_list = [str(i) for i in range(10)] taro_list = [] yes_list = [] for i in range(n): taro_list.append(input().split()) for j in range(n): if taro_list[j][4] == 'NO': for k in range(4): try: ans_list[ans_list.index(taro_list[j][k])] = '-' except ValueError: continue elif taro_list[j][4] == 'YES': for k in range(4): yes_list.append(taro_list[j][k]) if ans_list.count('-') == 9: ans = [i for i in ans_list if i != '-'] print(ans[0]) elif ans_list.count('-') == 0: ans = [i for i in yes_list if yes_list.count(i) == 2] print(ans[0]) else: ans = [i for i in yes_list if yes_list.count(i) == 2 and i in ans_list] print(ans[0])