結果

問題 No.725 木は明らかに森である
ユーザー fabled2468fabled2468
提出日時 2018-09-24 15:43:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 585 bytes
コンパイル時間 4,109 ms
コンパイル使用メモリ 76,140 KB
実行使用メモリ 57,644 KB
最終ジャッジ日時 2023-10-22 02:48:12
合計ジャッジ時間 5,362 ms
ジャッジサーバーID
(参考情報)
judge9 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,424 KB
testcase_01 AC 134 ms
57,124 KB
testcase_02 AC 133 ms
57,392 KB
testcase_03 AC 135 ms
57,644 KB
testcase_04 AC 133 ms
57,180 KB
testcase_05 AC 131 ms
57,364 KB
testcase_06 AC 133 ms
55,332 KB
testcase_07 AC 136 ms
57,396 KB
testcase_08 AC 133 ms
57,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main_725_treesForests {
    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        String value1 = scan.next();
        scan.close();

        String result = replaceTreeoneToForest(value1);
        System.out.println(result);
    }

    public static String replaceTreeoneToForest(String value1) {

        String replacedString = value1;

        if (value1.contains("treeone")) {
            replacedString = value1.replaceAll("treeone", "forest");
        }

        return replacedString;
    }
}
0