結果

問題 No.279 木の数え上げ
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2019-12-16 09:05:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 9,928 KB
最終ジャッジ日時 2023-09-15 17:15:24
合計ジャッジ時間 1,486 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,756 KB
testcase_02 AC 16 ms
7,836 KB
testcase_03 AC 16 ms
7,908 KB
testcase_04 AC 15 ms
7,832 KB
testcase_05 AC 15 ms
7,784 KB
testcase_06 AC 15 ms
7,832 KB
testcase_07 AC 15 ms
7,816 KB
testcase_08 AC 15 ms
7,836 KB
testcase_09 AC 16 ms
7,832 KB
testcase_10 AC 20 ms
9,652 KB
testcase_11 AC 16 ms
8,436 KB
testcase_12 AC 20 ms
9,160 KB
testcase_13 AC 16 ms
8,064 KB
testcase_14 AC 21 ms
9,888 KB
testcase_15 AC 20 ms
9,576 KB
testcase_16 AC 20 ms
9,420 KB
testcase_17 AC 21 ms
9,736 KB
testcase_18 AC 19 ms
8,944 KB
testcase_19 AC 20 ms
9,696 KB
testcase_20 AC 21 ms
9,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

t_count = s.count('t')
r_count = s.count('r')
e_count = s.count('e')

def min(a, b):
    return b if a >= b else a

max_tree = int(e_count / 2)
res = min(min(t_count, r_count), max_tree)

print(res)
0