結果

問題 No.725 木は明らかに森である
ユーザー xuelei
提出日時 2018-08-24 21:47:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 1,682 ms
コンパイル使用メモリ 160,584 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-06-23 07:02:45
合計ジャッジ時間 2,239 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin>>s;
  if(s.size()<7){
  	cout << s << endl;
  	return 0;
  }
  for(int i=0;i<s.size()-6;++i){
    if(s.substr(i,7)=="treeone"){
      s.erase(i,7);
      s.insert(i,"forest");
    }
  }
  cout << s << endl;
  return 0;
}
0