結果

問題 No.279 木の数え上げ
ユーザー Mayimg
提出日時 2018-12-23 01:22:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 1,476 ms
コンパイル使用メモリ 166,712 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-25 10:22:21
合計ジャッジ時間 2,370 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);  
	string s;
	cin >> s;
	int t = 0, r = 0, e = 0;
	for(int i = 0; i < s.size(); i++) {
		if(s[i] == 't') t++;
		if(s[i] == 'r') r++;
		if(s[i] == 'e') e++;
	}
	cout << min(min(t, r), e / 2) << endl;
	return 0;	
}
0