結果

問題 No.279 木の数え上げ
ユーザー uu
提出日時 2018-03-03 21:12:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 10,976 KB
最終ジャッジ日時 2023-09-17 21:12:05
合計ジャッジ時間 2,142 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,352 KB
testcase_01 AC 19 ms
8,204 KB
testcase_02 AC 18 ms
8,296 KB
testcase_03 AC 18 ms
8,324 KB
testcase_04 AC 18 ms
8,356 KB
testcase_05 AC 18 ms
8,328 KB
testcase_06 AC 18 ms
8,244 KB
testcase_07 AC 18 ms
8,208 KB
testcase_08 AC 18 ms
8,348 KB
testcase_09 WA -
testcase_10 AC 89 ms
9,952 KB
testcase_11 AC 35 ms
8,612 KB
testcase_12 AC 70 ms
9,456 KB
testcase_13 AC 28 ms
8,552 KB
testcase_14 AC 90 ms
10,976 KB
testcase_15 AC 80 ms
9,916 KB
testcase_16 AC 73 ms
9,752 KB
testcase_17 AC 90 ms
10,784 KB
testcase_18 AC 56 ms
9,108 KB
testcase_19 AC 90 ms
9,864 KB
testcase_20 AC 93 ms
10,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

S = input()
count = Counter(S)
tree_count = dict()

for k,v in count.items():
    if k in ["t","r","e"]:
        tree_count.update({k:v})

if tree_count["e"]:
    e_num = tree_count["e"]
    tree_count["e"] = int(e_num / 2)

print(0 if tree_count["e"] <= 1 else int(min([tree_count["t"],tree_count["r"],tree_count["e"]])))
0