結果

問題 No.24 数当てゲーム
ユーザー R NR N
提出日時 2020-08-04 16:58:24
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
RE  
実行時間 -
コード長 700 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,948 KB
実行使用メモリ 10,516 KB
最終ジャッジ日時 2023-10-12 20:41:59
合計ジャッジ時間 1,492 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

# coding:utf-8

import statistics

n = int(input())

taro_list = []
yes_num = []
no_num = []

for i in range(n):
    taro_list.append(input().split())

for j in range(n):
    for k in range(4):
        if taro_list[j][4] == 'NO':
            no_num.append(taro_list[j][k])
        else:
            yes_num.append(taro_list[j][k])

if len(yes_num) == 0:
    ans = set(ans_num) - set(no_num)
    print(*ans)

elif len(no_num) == 0:
    ans = statistics.mode(yes_num)
    print(*ans)

elif len(yes_num) >= 1 and len(no_num) >= 1:
    a = []
    for l in yes_num:
        if yes_num.count(l) == 2:
            a.append(l)
        else:
            continue
    ans = set(a) - set(no_num)
    print(*ans)
0