結果

問題 No.24 数当てゲーム
ユーザー kokesikokesi
提出日時 2019-06-25 20:53:40
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,796 KB
実行使用メモリ 7,872 KB
最終ジャッジ日時 2023-09-05 11:46:06
合計ジャッジ時間 1,272 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,716 KB
testcase_01 AC 17 ms
7,744 KB
testcase_02 AC 16 ms
7,816 KB
testcase_03 AC 16 ms
7,752 KB
testcase_04 AC 15 ms
7,784 KB
testcase_05 AC 16 ms
7,872 KB
testcase_06 AC 16 ms
7,796 KB
testcase_07 AC 16 ms
7,816 KB
testcase_08 AC 16 ms
7,784 KB
testcase_09 AC 16 ms
7,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()

nList = []
yList = []
r = ['0','1','2','3','4','5','6','7','8','9']
c = 0

for i in range(int(N)):
    L = list(input().split())
    if 'NO' in L:
        nList.extend(L)
    else:
        yList.extend(L)
    c = yList.count('YES')
for n in nList:
    if n in r:
        r.remove(n)

if len(r) == 1:
    print(r[0])
else:
    wList = [x for x in set(r) if yList.count(x) > c - 1]
    for w in wList:
        if w in r:
            print(w)
0