結果
問題 | No.279 木の数え上げ |
ユーザー |
|
提出日時 | 2019-12-15 02:16:21 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 703 ms |
コンパイル使用メモリ | 73,868 KB |
最終ジャッジ日時 | 2025-01-08 11:37:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long int ll; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); string S; cin >> S; int s=0,t=0,r=0; for(char c:S){ if(c=='t')s++; if(c=='r')t++; if(c=='e')r++; } r/=2; cout << min({s,t,r}) << endl; }