結果

問題 No.24 数当てゲーム
ユーザー RyutoRyuto
提出日時 2017-12-10 22:12:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 490 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 8,204 KB
最終ジャッジ日時 2023-08-20 09:59:01
合計ジャッジ時間 1,091 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#!/usr/bin/env python

N = int(input())
inlines = []
for i in range(N):
    inlines.append(input().split())

yescount = 0
yesnums = []
nonums = []
for line in inlines:
    if line[4] == 'YES':
        yesnums += line[:4]
        yescount += 1
    else:
        nonums += line[:4]

if len(set(nonums)) == 9:
    ans = list(set(range(10)) - set(map(int, nonums)))
    print(ans[0])
    exit()

for i in set(yesnums):
    if yesnums.count(i)==yescount and nonums.count(i)==0:
        print(i)
0