結果

問題 No.725 木は明らかに森である
ユーザー lloyz
提出日時 2023-09-03 23:48:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-13 04:20:18
合計ジャッジ時間 1,275 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

S = list(input())

TREEONE = ['t', 'r', 'e', 'e', 'o', 'n', 'e']
n = len(S)
i = 0
ANS = []
while i < n:
    if S[i:i + 7] == TREEONE:
        ANS.append('f')
        ANS.append('o')
        ANS.append('r')
        ANS.append('e')
        ANS.append('s')
        ANS.append('t')
        i += 7
    else:
        ANS.append(S[i])
        i += 1
print(''.join(ANS))
0