結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2018-08-23 00:13:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 469 ms |
コンパイル使用メモリ | 57,464 KB |
実行使用メモリ | 5,292 KB |
最終ジャッジ日時 | 2024-12-25 23:36:11 |
合計ジャッジ時間 | 1,901 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s; cin >> s; int count[3] = {}; for(int i = 0; i < s.length(); i++){ if(s[i] == 't') count[0]++; else if(s[i] == 'r') count[1]++; else if(s[i] == 'e') count[2]++; } cout << min({count[0],count[1],count[2]/2}) << endl; return 0; }