結果

問題 No.279 木の数え上げ
ユーザー chuka231chuka231
提出日時 2015-10-23 21:10:16
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 364 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 52,016 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-29 17:44:21
合計ジャッジ時間 2,977 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstring>
using namespace std;

int min(int n, int m)
{
if(n<m) return n;
else return m;
}

int main()
{
char s[2000];

cin >> s;

int t = 0;
int r = 0;
int e = 0;

for(int i=0; i<strlen(s); i++)
{
switch(s[i]) {
case 't' : t++;break;
case 'r' : r++;break;
case 'e' : e++;break;
}
}

cout << min(t, min(r, e/2)) << endl;

return 0;
}

0