結果

問題 No.24 数当てゲーム
ユーザー steek79steek79
提出日時 2015-10-12 12:35:20
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 6,060 KB
最終ジャッジ日時 2023-09-28 12:39:07
合計ジャッジ時間 929 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,928 KB
testcase_01 AC 12 ms
5,868 KB
testcase_02 AC 11 ms
5,992 KB
testcase_03 AC 11 ms
5,912 KB
testcase_04 AC 12 ms
5,892 KB
testcase_05 AC 12 ms
6,060 KB
testcase_06 AC 11 ms
5,964 KB
testcase_07 AC 11 ms
5,848 KB
testcase_08 AC 11 ms
5,844 KB
testcase_09 AC 11 ms
5,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())

Taro = [0]*10

for i in range(N):
    inp = raw_input().split()
    nums = map(int, inp[:4])
    yn = inp[4]    
    if yn == "YES":
        for n in nums:
            Taro[n] +=1
    elif yn == "NO":
        for n in nums:
            Taro[n] -=1
ans = Taro.index(max(Taro))
print ans
0