結果
| 問題 | 
                            No.279 木の数え上げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tenkyu9
                         | 
                    
| 提出日時 | 2018-01-22 01:07:55 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 27 ms / 2,000 ms | 
| コード長 | 444 bytes | 
| コンパイル時間 | 713 ms | 
| コンパイル使用メモリ | 70,420 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-25 21:59:47 | 
| 合計ジャッジ時間 | 1,915 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 21 | 
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include<cstring>
using namespace std;
 
int main(){
  string s;
  int a[3]={0};
  cin >> s;
  for(int i=0; i<s.size(); i++){
    if(s[i]=='t'){
      a[0]++;
    } else if(s[i]=='r'){
      a[1]++;
    } else if(s[i]=='e'){
      a[2]++;
    }
  }
  a[2]/=2;
  sort(a, a+3);
  cout << a[0] << endl;
  return 0;
}
            
            
            
        
            
tenkyu9