結果
| 問題 |
No.279 木の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-18 13:29:12 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 468 ms |
| コンパイル使用メモリ | 56,040 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 20:26:53 |
| 合計ジャッジ時間 | 1,449 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 20 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main()
{
int a=0, b=0, c=0;
string str;
cin >> str;
for (int i = 0; i < str.length(); i++)
{
if (str[i] == 't' || str[i]=='r')
{
a++;
}
if (str[i] == 'e')
{
b++;
}
if (a == 2 && b == 2)
{
c++;
a = 0, b = 0;
}
}
cout << c << endl;
return 0;
}