結果

問題 No.279 木の数え上げ
ユーザー shio
提出日時 2016-02-21 16:15:05
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 641 ms
コンパイル使用メモリ 74,796 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-14 15:24:43
合計ジャッジ時間 1,472 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
using namespace std;

int main(){
	string p;
	cin>>p;
	int a=0,b=0,c=0;
	for(int i=0;i<p.size();i++){
		if(p[i]=='t')a++;
		if(p[i]=='r')b++;
		if(p[i]=='e')c++;
	}
	c/=2;
	int ans=a;
	ans=min(ans,b);
	ans=min(ans,c);
	cout<<ans<<endl;
	return 0;
}



0