結果

問題 No.279 木の数え上げ
ユーザー 双六双六
提出日時 2020-07-27 03:35:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 11,340 KB
最終ジャッジ日時 2023-09-11 05:36:39
合計ジャッジ時間 2,411 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,428 KB
testcase_01 AC 19 ms
8,264 KB
testcase_02 AC 19 ms
8,324 KB
testcase_03 AC 19 ms
8,468 KB
testcase_04 AC 19 ms
8,328 KB
testcase_05 AC 19 ms
8,520 KB
testcase_06 AC 19 ms
8,344 KB
testcase_07 AC 19 ms
8,352 KB
testcase_08 AC 19 ms
8,328 KB
testcase_09 AC 19 ms
8,416 KB
testcase_10 AC 81 ms
10,980 KB
testcase_11 AC 32 ms
8,668 KB
testcase_12 AC 63 ms
9,552 KB
testcase_13 AC 27 ms
8,556 KB
testcase_14 AC 87 ms
11,340 KB
testcase_15 AC 75 ms
10,032 KB
testcase_16 AC 70 ms
9,872 KB
testcase_17 AC 82 ms
10,208 KB
testcase_18 AC 51 ms
9,216 KB
testcase_19 AC 80 ms
10,876 KB
testcase_20 AC 86 ms
10,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = input()
	D = defaultdict(int)
	for i in S:
		if i == "t":
			D["t"] += 1
		elif i == "r":
			D["r"] += 1
		elif i == "e":
			D["e"] += 1

	ans = min(D["t"], D["r"], int(D["e"] // 2))
	print(ans)

if __name__ == '__main__':
	main()
0