結果

問題 No.279 木の数え上げ
ユーザー r2en_
提出日時 2017-03-23 23:26:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 64,640 KB
実行使用メモリ 5,424 KB
最終ジャッジ日時 2024-07-05 18:56:50
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    string S;
    int tcnt = 0; int rcnt = 0; int ecnt = 0;
    cin >> S;
    for(int i = 0; i < S.size(); ++i){
        if(S[i] == 't'){ tcnt++; }
        else if(S[i] == 'r'){ rcnt++;  }
        else if(S[i] == 'e'){ ecnt++; }
    }
    cout << min(tcnt,min(rcnt,(ecnt/2))) << endl;
    return 0;
}
0