結果

問題 No.279 木の数え上げ
ユーザー r2en_
提出日時 2017-03-23 23:16:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 372 bytes
コンパイル時間 507 ms
コンパイル使用メモリ 64,256 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 18:56:19
合計ジャッジ時間 1,765 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 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++; }
    }
    if( (tcnt*2 == ecnt) && (tcnt == rcnt)){ cout << tcnt << endl; }
    return 0;
}
0