結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2015-11-04 16:20:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 623 ms |
コンパイル使用メモリ | 56,552 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 12:24:34 |
合計ジャッジ時間 | 1,700 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 21 |
ソースコード
#include<iostream> using namespace std; int main(){ string s; int ans=0,cnt_t=0,cnt_r=0,cnt_e=0; cin >> s; for(int i=0;i<s.length();i++) { if(s[i]=='t')cnt_t++; if(s[i]=='r')cnt_r++; if(s[i]=='e')cnt_e++; if(cnt_t==1&&cnt_r==1&&cnt_e==2) { ans++; cnt_t=0;cnt_r=0;cnt_e=0; } } cout << ans << endl; }