結果

問題 No.349 干支の置き物
ユーザー morina8823morina8823
提出日時 2016-03-22 20:41:38
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 945 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 6,120 KB
最終ジャッジ日時 2023-08-10 21:40:59
合計ジャッジ時間 2,204 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,924 KB
testcase_01 AC 11 ms
6,100 KB
testcase_02 AC 11 ms
5,940 KB
testcase_03 AC 11 ms
5,924 KB
testcase_04 AC 11 ms
5,944 KB
testcase_05 AC 11 ms
6,016 KB
testcase_06 AC 11 ms
6,020 KB
testcase_07 AC 12 ms
5,988 KB
testcase_08 AC 12 ms
6,020 KB
testcase_09 AC 11 ms
5,988 KB
testcase_10 AC 11 ms
5,988 KB
testcase_11 AC 12 ms
5,928 KB
testcase_12 AC 11 ms
5,988 KB
testcase_13 AC 11 ms
6,068 KB
testcase_14 AC 12 ms
6,064 KB
testcase_15 AC 11 ms
5,988 KB
testcase_16 AC 11 ms
6,032 KB
testcase_17 AC 11 ms
6,020 KB
testcase_18 AC 11 ms
5,924 KB
testcase_19 AC 12 ms
5,924 KB
testcase_20 AC 11 ms
6,008 KB
testcase_21 AC 11 ms
6,120 KB
testcase_22 AC 11 ms
6,020 KB
testcase_23 AC 11 ms
5,948 KB
testcase_24 AC 12 ms
6,020 KB
testcase_25 AC 11 ms
5,944 KB
testcase_26 AC 11 ms
5,928 KB
testcase_27 AC 12 ms
6,024 KB
testcase_28 AC 11 ms
6,068 KB
testcase_29 AC 11 ms
5,928 KB
testcase_30 AC 11 ms
6,072 KB
testcase_31 AC 11 ms
6,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

eto_list = ['ne',
            'ushi',
            'tora',
            'u',
            'tatsu',
            'mi',
            'uma',
            'hitsuji',
            'saru',
            'tori',
            'inu',
            'i']

eto = []
num = input('')

# check input value
if num < 2 or num > 50:
    print("Input value error. 2 <= number <= 50")
    sys.exit()

# input eto data
for i in range(num):
    eto.append(raw_input(''))

#print(">>> debug print : input values")
#print(eto)

eto_count_max = 0
for i in eto_list:
    if eto_count_max < eto.count(i):
        eto_count_max = eto.count(i)
#        print(">>> debug print : eto num count")
#        print("eto_list : ", eto_list)
#        print("eto_count_max : ", eto_count_max)

#print(">>> debug print : eto_count_max")
#print("eto_count_max : ", eto_count_max)

threshold = (num / 2) + (num % 2)
if eto_count_max <= threshold:
    print("YES")
else:
    print("NO")
0