結果

問題 No.725 木は明らかに森である
ユーザー PalearcticPalearctic
提出日時 2018-08-31 01:05:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 7,960 KB
最終ジャッジ日時 2023-10-11 21:48:08
合計ジャッジ時間 942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 15 ms
7,784 KB
testcase_05 AC 16 ms
7,824 KB
testcase_06 AC 15 ms
7,828 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
R="treeone"
M="forest"
A=[]
i=0
while(i<=len(S)-len(R)):
    for m in range(len(R)):
        if(S[i+m]!=R[m]):
            A.append(S[i])
            i+=1
            break
    else:         
        for j in M:
            A.append(j)
        i+=len(R)
for h in S[len(S)-len(R)+1:]:
    A.append(h)     
print("".join(A))
0