結果

問題 No.24 数当てゲーム
ユーザー togatogatogatoga
提出日時 2015-08-18 22:09:23
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 6,596 KB
実行使用メモリ 6,168 KB
最終ジャッジ日時 2023-09-25 12:55:40
合計ジャッジ時間 1,001 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,168 KB
testcase_01 AC 11 ms
6,064 KB
testcase_02 AC 11 ms
6,032 KB
testcase_03 AC 11 ms
5,924 KB
testcase_04 AC 12 ms
6,144 KB
testcase_05 AC 11 ms
5,940 KB
testcase_06 AC 11 ms
6,008 KB
testcase_07 AC 11 ms
5,948 KB
testcase_08 AC 11 ms
6,136 KB
testcase_09 AC 11 ms
5,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
ABCDR = []
yes = set()
no = set()
for i in range(0, 10):
    yes.add(i)
digit = [0] * 10
for i in range(N):
    text = raw_input().split()
    if(text[-1] == "YES"):
        for j in map(int, text[0:4]):
            digit[j] += 1
    else:
        for j in map(int, text[0:4]):
            yes.discard(j)
            digit[j] = -1145141919810
if (len(yes) == 1):
    print yes.pop()
else:
    print digit.index(max(digit))
    
0