結果

問題 No.725 木は明らかに森である
ユーザー N.MatsumotoN.Matsumoto
提出日時 2019-09-21 21:39:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 634 bytes
コンパイル時間 2,283 ms
コンパイル使用メモリ 75,060 KB
実行使用メモリ 57,600 KB
最終ジャッジ日時 2023-10-19 06:49:00
合計ジャッジ時間 4,011 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String[] array = sc.next().split("");

        List<String> res = new ArrayList<>();
        List<String> target = new ArrayList<>();
        for (String str : array) {
            if (target.size() != 7) {
                target.add(str);
            } else {
                if (String.join("", target).equals("treeone")) {
                    str = "forest";
                }
            }
            res.add(str);
        }
    }
}
0