結果
問題 |
No.279 木の数え上げ
|
ユーザー |
|
提出日時 | 2025-06-16 02:13:38 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 621 bytes |
コンパイル時間 | 3,030 ms |
コンパイル使用メモリ | 275,944 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-06-16 02:13:43 |
合計ジャッジ時間 | 5,007 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// string s; cin >> s; //////////////// 出力変数定義 //////////////// int result = 0; //////////////////// 処理 //////////////////// int t = 0; int r = 0; int e = 0; for (char c : s) { if (c=='t') t++; if (c=='r') r++; if (c=='e') e++; } result = min({t,r,e/2}); //////////////////// 出力 //////////////////// cout << result << endl; //////////////////// 終了 //////////////////// return 0; }