結果

問題 No.279 木の数え上げ
ユーザー nao109
提出日時 2021-03-29 12:23:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 1,402 ms
コンパイル使用メモリ 163,264 KB
実行使用メモリ 5,296 KB
最終ジャッジ日時 2024-11-29 09:45:16
合計ジャッジ時間 2,363 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin >> s;
    double ans[3];
    for(int i=0; i<s.size(); i++){
        if(s[i]=='t') ans[0]++;
        else if(s[i]=='r') ans[1]++;
        else if(s[i]=='e') ans[2]++;
    }
    ans[2]=floor(ans[2]/2);
    sort(ans,ans+3);
    cout << ans[0] << endl;
}
0