結果
問題 | No.725 木は明らかに森である |
ユーザー | Palearctic |
提出日時 | 2018-08-31 01:09:06 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 403 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 10,612 KB |
実行使用メモリ | 7,972 KB |
最終ジャッジ日時 | 2023-10-11 21:48:11 |
合計ジャッジ時間 | 960 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,920 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 16 ms
7,784 KB |
testcase_04 | AC | 15 ms
7,820 KB |
testcase_05 | WA | - |
testcase_06 | AC | 15 ms
7,924 KB |
testcase_07 | WA | - |
testcase_08 | AC | 16 ms
7,792 KB |
ソースコード
S=input() R="treeone" M="forest" A=[] i=0 flag=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 flag=0 break else: for j in M: A.append(j) i+=len(R) flag=1 if(flag==0): for h in S[len(S)-len(R)+1:]: A.append(h) print("".join(A))