結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー fabled2468fabled2468
提出日時 2018-09-24 21:48:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 702 bytes
コンパイル時間 3,846 ms
コンパイル使用メモリ 75,308 KB
実行使用メモリ 57,824 KB
最終ジャッジ日時 2023-10-24 16:44:31
合計ジャッジ時間 7,934 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
57,728 KB
testcase_01 AC 163 ms
57,708 KB
testcase_02 AC 142 ms
57,824 KB
testcase_03 AC 144 ms
57,772 KB
testcase_04 AC 141 ms
57,744 KB
testcase_05 AC 142 ms
57,772 KB
testcase_06 AC 142 ms
57,660 KB
testcase_07 AC 138 ms
57,760 KB
testcase_08 AC 142 ms
57,720 KB
testcase_09 AC 141 ms
57,696 KB
testcase_10 AC 141 ms
57,696 KB
testcase_11 AC 142 ms
57,760 KB
testcase_12 AC 142 ms
57,504 KB
testcase_13 AC 143 ms
57,560 KB
testcase_14 AC 142 ms
57,732 KB
testcase_15 AC 141 ms
57,664 KB
testcase_16 AC 145 ms
57,772 KB
testcase_17 AC 145 ms
57,812 KB
testcase_18 AC 143 ms
57,804 KB
testcase_19 AC 142 ms
57,580 KB
testcase_20 AC 142 ms
57,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

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

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

        // String value1 = "2018/09/24";

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

    public static String plusTwoDays(String value1) {

        LocalDate date = LocalDate.parse(value1, DateTimeFormatter.ofPattern("yyyy/MM/dd"));
        String datePlusTwoDays = date.plusDays(2).format(DateTimeFormatter.ofPattern("yyyy/MM/dd"));

        return datePlusTwoDays;
    }
}
0