結果

問題 No.349 干支の置き物
ユーザー fagfagdfafagfagdfa
提出日時 2017-08-25 21:25:49
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-23 15:22:38
合計ジャッジ時間 1,124 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 10 ms
6,944 KB
testcase_02 WA -
testcase_03 AC 10 ms
6,944 KB
testcase_04 AC 10 ms
6,944 KB
testcase_05 WA -
testcase_06 AC 13 ms
6,944 KB
testcase_07 AC 11 ms
6,944 KB
testcase_08 AC 10 ms
6,940 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 10 ms
6,940 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 10 ms
6,940 KB
testcase_16 AC 10 ms
6,944 KB
testcase_17 AC 9 ms
6,940 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 9 ms
6,940 KB
testcase_23 WA -
testcase_24 AC 10 ms
6,940 KB
testcase_25 AC 10 ms
6,944 KB
testcase_26 WA -
testcase_27 AC 10 ms
6,944 KB
testcase_28 WA -
testcase_29 AC 10 ms
6,944 KB
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()

dic = {}

for i in range(n):
    tmp = raw_input()
    if tmp not in dic:
        dic[tmp] = 1
    else:
        dic[tmp] += 1

keys = dic.keys()

maxes = 0

for i in keys:
    if maxes < dic[i]:
        maxes = dic[i]

a = (n - maxes) / maxes
if a % 3 == 1:
    print "NO"
else:
    print "YES"
0